MCPcopy Create free account
hub / github.com/dropbox/dbxcli / commandOutputFlagValue

Function commandOutputFlagValue

cmd/output.go:253–267  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

251}
252
253func commandOutputFlagValue(cmd *cobra.Command) string {
254 value, err := cmd.Flags().GetString(outputFlag)
255 if err == nil {
256 return value
257 }
258 value, err = cmd.InheritedFlags().GetString(outputFlag)
259 if err == nil {
260 return value
261 }
262 value, err = cmd.PersistentFlags().GetString(outputFlag)
263 if err == nil {
264 return value
265 }
266 return string(output.FormatText)
267}
268
269func parseOutputFormat(value string) (output.Format, error) {
270 switch output.Format(value) {

Callers 1

commandOutputFormatEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected