MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / IsProgrammaticOutputFormat

Function IsProgrammaticOutputFormat

pkg/constants/constants.go:84–91  ·  view source on GitHub ↗

IsProgrammaticOutputFormat tells you if it is acceptable for your command to print miscellaneous output to stdout, such as progress messages. If your command is capable of printing such things, you should check the output format first, lest you print a progress message into the middle of a JSON docu

(outputFormat string)

Source from the content-addressed store, hash-verified

82// If your command is capable of printing such things, you should check the output format
83// first, lest you print a progress message into the middle of a JSON document by accident.
84func IsProgrammaticOutputFormat(outputFormat string) bool { // TODO consider whether we should move this into the Factory
85 switch outputFormat {
86 case OutputFormatJson, OutputFormatBasic:
87 return true
88 default:
89 return false
90 }
91}

Callers 8

deployRunFunction · 0.92
listRunFunction · 0.92
createRunFunction · 0.92
listRunFunction · 0.92
listRunFunction · 0.92
runDbRunbookFunction · 0.92
runGitRunbookFunction · 0.92
runRunbooksByTagFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected