1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

fix: some linting issues (#2563)

This commit is contained in:
David Brouwer
2022-09-30 16:27:07 +02:00
committed by GitHub
parent 47e6a8d725
commit 85c0b0b8eb
221 changed files with 1025 additions and 1283 deletions

View File

@ -117,7 +117,7 @@ func InternalServerError(id, format string, a ...interface{}) error {
}
}
// Equal tries to compare errors
// Equal tries to compare errors.
func Equal(err1 error, err2 error) bool {
verr1, ok1 := err1.(*Error)
verr2, ok2 := err2.(*Error)
@ -137,7 +137,7 @@ func Equal(err1 error, err2 error) bool {
return true
}
// FromError try to convert go error to *Error
// FromError try to convert go error to *Error.
func FromError(err error) *Error {
if err == nil {
return nil
@ -149,7 +149,7 @@ func FromError(err error) *Error {
return Parse(err.Error())
}
// As finds the first error in err's chain that matches *Error
// As finds the first error in err's chain that matches *Error.
func As(err error) (*Error, bool) {
if err == nil {
return nil, false