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
Why is there an assumption of using the XxxErrors format for an array or slice? In many cases, it makes more sense to name them XxxError, for example:
XxxErrors
XxxError
package flagutil type IncompatiblePairError [2]string func (e IncompatiblePairError) Error() string { return fmt.Sprintf("flag --%s is incompatible with --%s", e[0], e[1]) }
This will fail with:
.../flagutil/flagutil.go: the type name `IncompatiblePairError` should conform to the `XxxErrors` format
It clearly does not represent multiple errors. Since many examples can be created with a slice or an array, why not allow both?
The text was updated successfully, but these errors were encountered:
Hello, @maraino
It was introduced in #3
But I found that both options are widely used
So it looks reasonable to reconsider this decision 👍
Sorry, something went wrong.
After fix:
$ errname util.go /tmp/sandbox/util.go:5:6: the error type name `IncompatiblePairEror` should conform to the `XxxErrors` or `XxxError` format
Successfully merging a pull request may close this issue.
Why is there an assumption of using the
XxxErrors
format for an array or slice? In many cases, it makes more sense to name themXxxError
, for example:This will fail with:
It clearly does not represent multiple errors. Since many examples can be created with a slice or an array, why not allow both?
The text was updated successfully, but these errors were encountered: