u/SnooSongs6758

▲ 10 r/golang

How to check for undefined attributes on JSON?

Hello everybody. I'm creating an rest API using Golang v1.25, Gin v1.10.0, and Validator v10.20.0. I have a PATCH endpoint that when the address attribute is: undefined -> keep the original data; null -> delete the original data; contain something -> replace the original data by the new. Right now I'm using a pointer for it, so I can know when it's null. The problem is that I couldn't find a way to differentiate when the attribute is undefined or null.

Does anyone know a way to check if a specific attribute undefined?

reddit.com
u/SnooSongs6758 — 13 days ago

Create a wankel engine

Hi everyone. I want to build my own Wankel engine using CNC services. Does anyone know if the JLPCB and PCBway are good? I'm accepting service suggestions for the European location.

reddit.com
u/SnooSongs6758 — 4 months ago