MCPcopy Create free account
hub / github.com/DoNewsCode/core / Newf

Function Newf

unierr/error.go:41–43  ·  view source on GitHub ↗

Newf returns New(code, fmt.Sprintf(format, args...)).

(code codes.Code, format string, args ...interface{})

Source from the content-addressed store, hash-verified

39
40// Newf returns New(code, fmt.Sprintf(format, args...)).
41func Newf(code codes.Code, format string, args ...interface{}) *Error {
42 return New(code, fmt.Sprintf(format, args...))
43}
44
45// Wrap annotates an error with a codes.Code
46func Wrap(err error, code codes.Code) *Error {

Callers

nothing calls this directly

Calls 2

NewFunction · 0.70
SprintfMethod · 0.65

Tested by

no test coverage detected