func (s SomeType) Validate() error {
if s.Id == 0 {
return errors.New("validation: id is required")
}
return nil
}
When I run golangci-lint with wrapckeck enabled I have an error: error returned from external package is unwrapped: sig: func errors.New(text string) error (wrapcheck)
I have a function that returns a new error:
When I run
golangci-lint
with wrapckeck enabled I have an error:error returned from external package is unwrapped: sig: func errors.New(text string) error (wrapcheck)