-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Empty value types will be unexpectedly omitted with json:"omitempty" tag. The convention here is to use pointer types for optional fields.
Seems that no existing linters could do that. Is it OK to add a custom linter here to check usage like that?
go-github/github/issues_events.go
Line 22 in d09e464
| Action string `json:"action,omitempty"` |
I only found one place avoiding the role, although the type is a returned type and is rarely marshaled. But it will be helpful to check incoming PRs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels