(args map[string]interface{})
| 134 | } |
| 135 | |
| 136 | func (gohanClientCLI *GohanClientCLI) handleCommonArguments(args map[string]interface{}) error { |
| 137 | if outputFormatOpt, ok := args[outputFormatKey]; ok { |
| 138 | outputFormat, err := findOutputFormat(outputFormatOpt) |
| 139 | if err != nil { |
| 140 | return err |
| 141 | } |
| 142 | delete(args, outputFormatKey) |
| 143 | gohanClientCLI.opts.outputFormat = outputFormat |
| 144 | } |
| 145 | |
| 146 | if verbosity, ok := args[logLevelKey]; ok { |
| 147 | logLevel, err := parseLogLevel(verbosity) |
| 148 | if err != nil { |
| 149 | return err |
| 150 | } |
| 151 | delete(args, logLevelKey) |
| 152 | gohanClientCLI.opts.logLevel = logLevel |
| 153 | setUpLogging(logLevel) |
| 154 | } |
| 155 | |
| 156 | if fieldsOpt, ok := args[fieldsKey]; ok { |
| 157 | fields, err := findFields(fieldsOpt) |
| 158 | if err != nil { |
| 159 | return err |
| 160 | } |
| 161 | delete(args, fieldsKey) |
| 162 | gohanClientCLI.opts.fields = fields |
| 163 | } |
| 164 | |
| 165 | return nil |
| 166 | } |
| 167 | |
| 168 | func (gohanClientCLI *GohanClientCLI) handleRelationArguments(s *schema.Schema, args map[string]interface{}) (map[string]interface{}, error) { |
| 169 | parsedArgs := map[string]interface{}{} |
no test coverage detected