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

Function newBranchPattern

docopt.go:747–753  ·  view source on GitHub ↗
(t patternType, pl ...*pattern)

Source from the content-addressed store, hash-verified

745type patternList []*pattern
746
747func newBranchPattern(t patternType, pl ...*pattern) *pattern {
748 var p pattern
749 p.t = t
750 p.children = make(patternList, len(pl))
751 copy(p.children, pl)
752 return &p
753}
754
755func newRequired(pl ...*pattern) *pattern {
756 return newBranchPattern(patternRequired, pl...)

Callers 4

newRequiredFunction · 0.85
newEitherFunction · 0.85
newOneOrMoreFunction · 0.85
newOptionalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected