MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / Wrapf

Function Wrapf

internal/util/errors.go:12–16  ·  view source on GitHub ↗

Wrapf wraps *errp with the given formatted message if *errp is not nil.

(errp *error, format string, args ...any)

Source from the content-addressed store, hash-verified

10
11// Wrapf wraps *errp with the given formatted message if *errp is not nil.
12func Wrapf(errp *error, format string, args ...any) {
13 if *errp != nil {
14 *errp = fmt.Errorf("%s: %w", fmt.Sprintf(format, args...), *errp)
15 }
16}

Callers 3

fileResourceHandlerFunction · 0.92
fileRootFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…