Go Protobuf declarations and optional Fields in Go Struct (string pointers)
问题 I am running into a bit of a problem with Protoc and my existing struct that contains nullable string fields. The struct I am trying to serialize for transmission contains a bunch of fields that are nullable in json (so we can distinguish between null , "" and a set value). type Message struct { Path *string `json:"path"` } So if a user sends a empty json string {} the Path will be nil and not "" , whereas {"path":""} is also valid and a different case from {"path": null} . The proto3