MCPcopy
hub / github.com/coder/websocket / Wrap

Function Wrap

internal/errd/wrap.go:10–14  ·  view source on GitHub ↗

Wrap wraps err with fmt.Errorf if err is non nil. Intended for use with defer and a named error return. Inspired by https://github.com/golang/go/issues/32676.

(err *error, f string, v ...any)

Source from the content-addressed store, hash-verified

8// Intended for use with defer and a named error return.
9// Inspired by https://github.com/golang/go/issues/32676.
10func Wrap(err *error, f string, v ...any) {
11 if *err != nil {
12 *err = fmt.Errorf(f+": %w", append(v, *err)...)
13 }
14}

Callers 15

echoServerFunction · 0.92
dialFunction · 0.92
CloseMethod · 0.92
CloseNowMethod · 0.92
readerMethod · 0.92
acceptFunction · 0.92
wstestServerFunction · 0.92
wstestCaseCountFunction · 0.92
unusedListenAddrFunction · 0.92
CloseMethod · 0.92
writeFramePayloadMethod · 0.92
readFrameHeaderFunction · 0.92

Calls

no outgoing calls

Tested by 5

echoServerFunction · 0.74
wstestServerFunction · 0.74
wstestCaseCountFunction · 0.74
unusedListenAddrFunction · 0.74
echoServerFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…