MCPcopy Index your code
hub / github.com/coder/coder / mustMarshalJSON

Function mustMarshalJSON

agent/agentchat/headers_test.go:156–161  ·  view source on GitHub ↗

mustMarshalJSON marshals v to a JSON string, failing the test on error.

(t *testing.T, v any)

Source from the content-addressed store, hash-verified

154
155// mustMarshalJSON marshals v to a JSON string, failing the test on error.
156func mustMarshalJSON(t *testing.T, v any) string {
157 t.Helper()
158 b, err := json.Marshal(v)
159 require.NoError(t, err)
160 return string(b)
161}

Callers 2

TestMiddlewareAccessLogFunction · 0.85
TestExtractContextFunction · 0.85

Calls 2

HelperMethod · 0.65
MarshalMethod · 0.45

Tested by

no test coverage detected