Method
findCommand
(name string, commands []*CommandDefinition)
Source from the content-addressed store, hash-verified
| 158 | } |
| 159 | |
| 160 | func (a autoCompleteHandler) findCommand(name string, commands []*CommandDefinition) *CommandDefinition { |
| 161 | for _, command := range commands { |
| 162 | if command.Name == name { |
| 163 | return command |
| 164 | } |
| 165 | } |
| 166 | return nil |
| 167 | } |
| 168 | |
| 169 | func (a autoCompleteHandler) searchCommands(word string, commands []*CommandDefinition, exclude []string) []string { |
| 170 | result := []string{} |
Tested by
no test coverage detected