MCPcopy Create free account
hub / github.com/diillson/chatcli / matches

Method matches

cli/command_handler.go:34–39  ·  view source on GitHub ↗
(input string)

Source from the content-addressed store, hash-verified

32}
33
34func (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

Callers 2

TestPrefixRouteMatchesFunction · 0.95
lookupMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestPrefixRouteMatchesFunction · 0.76