MCPcopy Create free account
hub / github.com/docopt/docopt.go / index

Method index

docopt.go:1157–1164  ·  view source on GitHub ↗
(p *pattern)

Source from the content-addressed store, hash-verified

1155}
1156
1157func (pl patternList) index(p *pattern) (int, error) {
1158 for i, c := range pl {
1159 if c.eq(p) {
1160 return i, nil
1161 }
1162 }
1163 return -1, newError("%s not in list", p)
1164}
1165
1166func (pl patternList) count(p *pattern) int {
1167 count := 0

Callers 1

fixIdentitiesMethod · 0.80

Calls 1

eqMethod · 0.45

Tested by

no test coverage detected