MCPcopy
hub / github.com/spf13/cobra / commandNameMatches

Function commandNameMatches

command.go:1928–1934  ·  view source on GitHub ↗

commandNameMatches checks if two command names are equal taking into account case sensitivity according to EnableCaseInsensitive global configuration.

(s string, t string)

Source from the content-addressed store, hash-verified

1926// taking into account case sensitivity according to
1927// EnableCaseInsensitive global configuration.
1928func commandNameMatches(s string, t string) bool {
1929 if EnableCaseInsensitive {
1930 return strings.EqualFold(s, t)
1931 }
1932
1933 return s == t
1934}
1935
1936// tmplFunc holds a template and a function that will execute said template.
1937type tmplFunc struct {

Callers 2

findNextMethod · 0.85
HasAliasMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…