(input string)
| 32 | } |
| 33 | |
| 34 | func (r prefixRoute) matches(input string) bool { |
| 35 | if r.word { |
| 36 | return input == r.prefix || strings.HasPrefix(input, r.prefix+" ") |
| 37 | } |
| 38 | return strings.HasPrefix(input, r.prefix) |
| 39 | } |
| 40 | |
| 41 | // commandRoutes holds the dispatch tables. Kept in a separate struct so that |
| 42 | // CommandHandler stays comparable (its only added field is a pointer) — the |
no outgoing calls