MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / getOutputFormat

Function getOutputFormat

internal/cli/cli_helpers.go:246–253  ·  view source on GitHub ↗

getOutputFormat reads the --output flag value from the command.

(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

244
245// getOutputFormat reads the --output flag value from the command.
246func getOutputFormat(cmd *cobra.Command) string {
247 f, _ := cmd.Flags().GetString("output")
248 if f == "" {
249 return outputJSON
250 }
251
252 return f
253}
254
255// printJSON marshals v as indented JSON and writes it to stdout.
256func printJSON(v any) error {

Callers 14

runStorageListFunction · 0.85
runStorageShowFunction · 0.85
runStorageContentListFunction · 0.85
runNodesListFunction · 0.85
runNodesShowFunction · 0.85
runTasksListFunction · 0.85
runCommunityScriptsShowFunction · 0.85
runCommunityScriptsPlanFunction · 0.85
printInstallResultFunction · 0.85
runGuestsListFunction · 0.85
runGuestsShowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected