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

Function newResponse

internal/jsonrpc2/wire_test.go:97–103  ·  view source on GitHub ↗
(id any, result any, rerr error)

Source from the content-addressed store, hash-verified

95}
96
97func newResponse(id any, result any, rerr error) jsonrpc2.Message {
98 msg, err := jsonrpc2.NewResponse(newID(id), result, rerr)
99 if err != nil {
100 panic(err)
101 }
102 return msg
103}
104
105func checkJSON(t *testing.T, got, want []byte) {
106 // compare the compact form, to allow for formatting differences

Callers 1

TestWireMessageFunction · 0.85

Calls 2

NewResponseFunction · 0.92
newIDFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…