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

Method getListCommand

cli/client/commands.go:68–82  ·  view source on GitHub ↗
(s *schema.Schema)

Source from the content-addressed store, hash-verified

66}
67
68func (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
84func (gohanClientCLI *GohanClientCLI) getGetCommand(s *schema.Schema) gohanCommand {
85 return gohanCommand{

Callers 2

getCommandsMethod · 0.95
client_test.goFile · 0.80

Calls 4

handleArgumentsMethod · 0.95
getFieldsParamMethod · 0.95
requestMethod · 0.95
formatOutputMethod · 0.95

Tested by

no test coverage detected