We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
It's easy to make the mistake of adding omitempty struct tags like this (example from https://github.com/golang/oauth2/blob/master/token.go#L50C2-L50C44.):
Expiry time.Time `json:"expiry,omitempty"`
Currently, this does nothing. With encoding/json/v2 it might become omitzero.
I suggest to add a vet check flagging omitempty as error when added on time.Time non-basic types according to encoding/json's isEmptyValue (https://github.com/golang/go/pull/63533/files#diff-01d931f6d3bbaef911876952770a164229fe8d659b9007f4be9fc1ea12d20abeR306).
The text was updated successfully, but these errors were encountered:
Duplicate of #51261
Sorry, something went wrong.
No branches or pull requests