在标准库errors, ``` func New(text string) error { return &errorString{text} } // errorString is a trivial implementation of error. type errorString struct { s string } func (e *errorString) Error() string { return e.s } ``` 调用errors,是 (errors.New("Err")),为什么呢
更多评论
