golang grpc stubs, omit non empty values on marshalling

Viewed 27

so I have this fields on my struct (autogenerated)

Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"-"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`

Skipping fields if json marshal is super easy, you just set it to -

Is there a way to do a similar trick with grpc? Don't want to output all fields, also don't want to manually nullify some of the fields on the object, even though it's possible

Thanks

0 Answers
Related