MCPcopy Create free account
hub / github.com/basecamp/hey-cli / FormatFromFlags

Function FormatFromFlags

internal/output/writer.go:305–322  ·  view source on GitHub ↗
(jsonFlag, quiet, idsOnly, count, markdown, styled, agent bool)

Source from the content-addressed store, hash-verified

303}
304
305func FormatFromFlags(jsonFlag, quiet, idsOnly, count, markdown, styled, agent bool) Format {
306 switch {
307 case count:
308 return FormatCount
309 case idsOnly:
310 return FormatIDs
311 case quiet:
312 return FormatQuiet
313 case jsonFlag || agent:
314 return FormatJSON
315 case markdown:
316 return FormatMarkdown
317 case styled:
318 return FormatStyled
319 default:
320 return FormatAuto
321 }
322}
323
324func NormalizeJSONNumbers(data []byte) (any, error) {
325 dec := json.NewDecoder(bytes.NewReader(data))

Callers 3

newRootCmdFunction · 0.92
ExecuteFunction · 0.92
TestFormatFromFlagsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestFormatFromFlagsFunction · 0.68