1. Home
  2. Docs
  3. golang
  4. 内置库(包-package)
  5. errors

errors

errors.New()

func New(text string) error


New returns an error that formats as the given text. Each call to New returns a distinct error value even if the text is identical.

New返回一个错误,其格式为给定的文本。对New的每次调用都会返回一个不同的错误值,即使文本是相同的。

Was this article helpful to you? Yes No

How can we help?