(s *schema.Schema)
| 66 | } |
| 67 | |
| 68 | func (gohanClientCLI *GohanClientCLI) getListCommand(s *schema.Schema) gohanCommand { |
| 69 | return gohanCommand{ |
| 70 | Name: fmt.Sprintf("%s list", s.ID), |
| 71 | Schema: s, |
| 72 | Action: func(args []string) (string, error) { |
| 73 | _, err := gohanClientCLI.handleArguments(args, s) |
| 74 | if err != nil { |
| 75 | return "", err |
| 76 | } |
| 77 | url := fmt.Sprintf("%s%s%s", gohanClientCLI.opts.gohanEndpointURL, s.URL, gohanClientCLI.getFieldsParam(true)) |
| 78 | result, err := gohanClientCLI.request("GET", url, nil) |
| 79 | return gohanClientCLI.formatOutput(s, result), err |
| 80 | }, |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | func (gohanClientCLI *GohanClientCLI) getGetCommand(s *schema.Schema) gohanCommand { |
| 85 | return gohanCommand{ |
no test coverage detected