а
Size: a a a
p
ЗА
E
ЗА
G
NG
type SomeService interface {
DoSomething(
foo string
bar bool
baz *int
) (SomeModel, error)
DoSomethingElse() error
}
NG
AE
*QueryError
: &e
?e
имеет тип *QueryError
// Similar to:ref.: https://blog.golang.org/go1.13-errors
// if e, ok := err.(*QueryError); ok { … }
var e *QueryError
if errors.As(err, &e) {
// err is a *QueryError, and e is set to the error's value
}