(commands []*Command, writer io.Writer)
| 185 | var DefaultAppComplete = DefaultRootCommandComplete |
| 186 | |
| 187 | func printCommandSuggestions(commands []*Command, writer io.Writer) { |
| 188 | for _, command := range commands { |
| 189 | if command.Hidden { |
| 190 | continue |
| 191 | } |
| 192 | if len(command.Usage) > 0 { |
| 193 | _, _ = fmt.Fprintf(writer, "%s:%s\n", command.Name, command.Usage) |
| 194 | } else { |
| 195 | _, _ = fmt.Fprintf(writer, "%s\n", command.Name) |
| 196 | } |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | func cliArgContains(flagName string, args []string) bool { |
| 201 | for _, name := range strings.Split(flagName, ",") { |
no outgoing calls
no test coverage detected
searching dependent graphs…