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)
| 327 | // being sent to it |
| 328 | // **Note**: The name should be an empty string for APIs. |
| 329 | func 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 | |
| 340 | func printFullActivationList(activations []whisk.Activation) { |
| 341 | fmt.Fprintf(color.Output, "%s\n", boldString("activations")) |