Go · Function
errors.New
errors.New creates an error from a text message. Each call returns a distinct error value, so reuse a sentinel error when callers need to identify that condition.
Last updated
Syntax
func New(text string) errorIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
fmt.Errorferrors.Iserrors.Aserrors.AsTypeerrors.Joinerrors.Unwrap