MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / FormatJSON

Function FormatJSON

cmd/ui.go:213–219  ·  view source on GitHub ↗

FormatJSON formats JSON with syntax highlighting

(data []byte)

Source from the content-addressed store, hash-verified

211
212// FormatJSON formats JSON with syntax highlighting
213func FormatJSON(data []byte) string {
214 var prettyJSON bytes.Buffer
215 if err := json.Indent(&prettyJSON, data, "", " "); err != nil {
216 return string(data)
217 }
218 return prettyJSON.String()
219}
220
221// FetchAllPages fetches all pages from a paginated API endpoint.
222// It returns all response bodies as a slice, stopping when a page returns

Callers 10

environment.goFile · 0.85
site.goFile · 0.85
renderQueryTableFunction · 0.85
monitor.goFile · 0.85
group.goFile · 0.85
metric.goFile · 0.85
statuspage.goFile · 0.85
notification.goFile · 0.85
maintenance.goFile · 0.85
issue.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected