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

Function outputCustomCommands

cli/client/client.go:183–189  ·  view source on GitHub ↗
(schema *schema.Schema, action *schema.Action)

Source from the content-addressed store, hash-verified

181}
182
183func outputCustomCommands(schema *schema.Schema, action *schema.Action) (string, error) {
184 entry := ActionTemplateEntry{schema, action}
185 buf := new(bytes.Buffer)
186 tmpl, _ := template.New("schema").Parse(actionTemplate)
187 tmpl.Execute(buf, entry)
188 return buf.String(), nil
189}
190
191// NewGohanClientCLI GohanClientCLI constructor
192func NewGohanClientCLI(opts *GohanClientCLIOpts) (*GohanClientCLI, error) {

Callers 1

ExecuteCommandMethod · 0.85

Calls 2

ParseMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected