MCPcopy Create free account
hub / github.com/cloudwan/gohan / findOutputFormat

Function findOutputFormat

cli/client/opts.go:186–193  ·  view source on GitHub ↗
(formatOpt interface{})

Source from the content-addressed store, hash-verified

184}
185
186func findOutputFormat(formatOpt interface{}) (string, error) {
187 for _, format := range outputFormats {
188 if format == formatOpt {
189 return format, nil
190 }
191 }
192 return "", fmt.Errorf(incorrectOutputFormat, outputFormats)
193}
194
195func findFields(fieldsOpt interface{}) ([]string, error) {
196 // TODO: perform fields check against resource definition

Callers 2

NewOptsFromEnvFunction · 0.85
handleCommonArgumentsMethod · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected