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

Function newOptional

docopt.go:767–769  ·  view source on GitHub ↗
(pl ...*pattern)

Source from the content-addressed store, hash-verified

765}
766
767func newOptional(pl ...*pattern) *pattern {
768 return newBranchPattern(patternOptionAL, pl...)
769}
770
771func newOptionsShortcut() *pattern {
772 var p pattern

Callers 8

parseAtomFunction · 0.85
TestPatternFlatFunction · 0.85
TestParsePatternFunction · 0.85
TestOptionalMatchFunction · 0.85
TestOneOrMoreMatchFunction · 0.85
TestBasicPatternMatchingFunction · 0.85
TestPatternEitherFunction · 0.85

Calls 1

newBranchPatternFunction · 0.85

Tested by 7

TestPatternFlatFunction · 0.68
TestParsePatternFunction · 0.68
TestOptionalMatchFunction · 0.68
TestOneOrMoreMatchFunction · 0.68
TestBasicPatternMatchingFunction · 0.68
TestPatternEitherFunction · 0.68