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? Sign in to your account
I think this is a regression after #105, particularly this line:
func (t DateTime) IsZero() bool { return time.Time(t).IsZero() }
I think IsZero() func should accept a pointer receiver, as it may be called on nil values.
IsZero()
nil
For example, I have a generated code from a swagger model that does the following check on an optional date-time field created_on in the request:
created_on
func (m *Entity) validateCreatedOn(formats strfmt.Registry) error { if swag.IsZero(m.CreatedOn) { // not required return nil } if err := validate.FormatOf("created_on", "body", "date-time", m.CreatedOn.String(), formats); err != nil { return err } return nil }
which now panics on the very first if statement.
if
The text was updated successfully, but these errors were encountered:
b36a490
Alternative: go-openapi/swag#67
Sorry, something went wrong.
No branches or pull requests
I think this is a regression after #105, particularly this line:
I think
IsZero()
func should accept a pointer receiver, as it may be called onnil
values.For example, I have a generated code from a swagger model that does the following check on an optional date-time field
created_on
in the request:which now panics on the very first
if
statement.The text was updated successfully, but these errors were encountered: