(cmd *Command, args []string)
| 100 | } |
| 101 | |
| 102 | func runHelp(cmd *Command, args []string) { |
| 103 | if l := len(args); l != 1 { |
| 104 | if l > 1 { |
| 105 | // Don't support multiple commands |
| 106 | SetExitStatus(2) |
| 107 | } |
| 108 | MainUsage() |
| 109 | } |
| 110 | |
| 111 | cmdName := args[0] |
| 112 | for _, command := range CqlCommands { |
| 113 | if command.Name() != cmdName { |
| 114 | continue |
| 115 | } |
| 116 | printCommandHelp(command) |
| 117 | return |
| 118 | } |
| 119 | |
| 120 | //Not support command |
| 121 | SetExitStatus(2) |
| 122 | MainUsage() |
| 123 | } |
| 124 | |
| 125 | // MainUsage prints cql base help |
| 126 | func MainUsage() { |
nothing calls this directly
no test coverage detected