MCPcopy Create free account
hub / github.com/apache/openwhisk-cli / printCommandsList

Function printCommandsList

commands/util.go:329–338  ·  view source on GitHub ↗

Used to print Action, Trigger, Package, and Rule lists Param: Takes in a array of Printable interface, and the name of the command being sent to it **Note**: The name should be an empty string for APIs.

(commands []whisk.Printable, defaultHeader string)

Source from the content-addressed store, hash-verified

327// being sent to it
328// **Note**: The name should be an empty string for APIs.
329func printCommandsList(commands []whisk.Printable, defaultHeader string) {
330 if len(commands) != 0 {
331 fmt.Fprint(color.Output, boldString(commands[0].ToHeaderString()))
332 for i := range commands {
333 fmt.Print(commands[i].ToSummaryRowString())
334 }
335 } else {
336 fmt.Fprintf(color.Output, "%s\n", boldString(defaultHeader))
337 }
338}
339
340func printFullActivationList(activations []whisk.Activation) {
341 fmt.Fprintf(color.Output, "%s\n", boldString("activations"))

Callers 1

printListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected