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

Function newCommand

docopt.go:791–798  ·  view source on GitHub ↗
(name string, value interface{})

Source from the content-addressed store, hash-verified

789}
790
791func newCommand(name string, value interface{}) *pattern {
792 // default: value=false
793 var p pattern
794 p.t = patternCommand
795 p.name = name
796 p.value = value
797 return &p
798}
799
800func newOption(short, long string, argcount int, value interface{}) *pattern {
801 // default: "", "", 0, false

Callers 4

parseAtomFunction · 0.85
singleMatchMethod · 0.85
TestParsePatternFunction · 0.85
TestCommandMatchFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestParsePatternFunction · 0.68
TestCommandMatchFunction · 0.68