(jsonBytes []byte)
| 523 | } |
| 524 | |
| 525 | func 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. |
| 535 | func GetCommentsJSON(cs []CommentThread) (string, error) { |
no test coverage detected