MCPcopy Create free account
hub / github.com/majd/ipatool / OutputFormatFromString

Function OutputFormatFromString

cmd/output_format.go:16–25  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

14)
15
16func OutputFormatFromString(value string) (OutputFormat, error) {
17 switch value {
18 case "json":
19 return OutputFormatJSON, nil
20 case "text":
21 return OutputFormatText, nil
22 default:
23 return OutputFormatJSON, fmt.Errorf("invalid output format '%s'", value)
24 }
25}

Callers 1

initWithCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected