MCPcopy Create free account
hub / github.com/coder/coder / consumeJSONEOF

Function consumeJSONEOF

coderd/x/chatd/chatdebug/redaction.go:153–163  ·  view source on GitHub ↗
(decoder *json.Decoder)

Source from the content-addressed store, hash-verified

151}
152
153func consumeJSONEOF(decoder *json.Decoder) error {
154 var extra any
155 err := decoder.Decode(&extra)
156 if errors.Is(err, io.EOF) {
157 return nil
158 }
159 if err == nil {
160 return xerrors.New("chatdebug: extra JSON values")
161 }
162 return err
163}
164
165// safeRateLimitHeaderNames lists rate-limit headers that contain
166// "token" in the name but carry numeric usage counters, not

Callers 1

RedactJSONSecretsFunction · 0.85

Calls 2

NewMethod · 0.65
IsMethod · 0.45

Tested by

no test coverage detected