MCPcopy Index your code
hub / github.com/google/git-appraise / prettyPrintJSON

Function prettyPrintJSON

review/review.go:525–532  ·  view source on GitHub ↗
(jsonBytes []byte)

Source from the content-addressed store, hash-verified

523}
524
525func prettyPrintJSON(jsonBytes []byte) (string, error) {
526 var prettyBytes bytes.Buffer
527 err := json.Indent(&prettyBytes, jsonBytes, "", " ")
528 if err != nil {
529 return "", err
530 }
531 return prettyBytes.String(), nil
532}
533
534// GetCommentsJSON returns the pretty printed JSON for a slice of comment threads.
535func GetCommentsJSON(cs []CommentThread) (string, error) {

Callers 3

GetCommentsJSONFunction · 0.85
GetJSONMethod · 0.85
GetJSONMethod · 0.85

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected