Optional field with json tag "omitempty" should be type of pointer. #159
Labels
breaking-change
A change that needs a major version bump
Milestone
8000
Optional field with json tag "omitempty" should be type of pointer, since the optional fields usually accepts 3 types of input: nil (omitted when the field is nil), empty (Should not be omitted. eg: "" for string, 0 for int), and not empty. E.g:
Labels []string
json:"labels,omitempty"
should be
Labels *[]string
json:"labels,omitempty"
The text was updated successfully, but these errors were encountered: