Go · Function
fmt.Errorf
fmt.Errorf formats values into an error. The %w verb also wraps an error so callers can inspect the underlying error.
Last updated
- Since
- Go 1.13
Syntax
func Errorf(format string, a ...interface{}) errorIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
errors.Unwraperrors.Iserrors.Asfmt.Errorf%w