MCPcopy Create free account
hub / github.com/IBM/newrelic-cli / hasJSONPrefix

Function hasJSONPrefix

utils/decoder.go:335–337  ·  view source on GitHub ↗

hasJSONPrefix returns true if the provided buffer appears to start with a JSON open brace.

(buf []byte)

Source from the content-addressed store, hash-verified

333// hasJSONPrefix returns true if the provided buffer appears to start with
334// a JSON open brace.
335func hasJSONPrefix(buf []byte) bool {
336 return hasPrefix(buf, jsonPrefix)
337}
338
339// Return true if the first non-whitespace bytes in buf is
340// prefix.

Callers 2

ToJSONFunction · 0.85
GuessJSONStreamFunction · 0.85

Calls 1

hasPrefixFunction · 0.85

Tested by

no test coverage detected