MCPcopy
hub / github.com/tailscale/tailscale / Errorf

Function Errorf

util/vizerror/vizerror.go:38–44  ·  view source on GitHub ↗

Errorf returns an Error with the specified publicMsgFormat and values. It always returns a vizerror.Error. Warning: avoid using an error as one of the format arguments, as this will cause the text of that error to be displayed to the end user (which is probably not what you want).

(publicMsgFormat string, a ...any)

Source from the content-addressed store, hash-verified

36// Warning: avoid using an error as one of the format arguments, as this will cause the text
37// of that error to be displayed to the end user (which is probably not what you want).
38func Errorf(publicMsgFormat string, a ...any) error {
39 err := fmt.Errorf(publicMsgFormat, a...)
40 return Error{
41 publicErr: err,
42 wrapped: err,
43 }
44}
45
46// Unwrap returns the underlying error.
47//

Callers 7

UnmarshalTextMethod · 0.92
ValidateMethod · 0.92
ParseHostPortRangeFunction · 0.92
ToFQDNFunction · 0.92
ValidLabelFunction · 0.92
TestErrorfFunction · 0.70

Calls 1

ErrorfMethod · 0.65

Tested by 2

TestErrorfFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…