MCPcopy
hub / github.com/spf13/pflag / NewFlagSet

Function NewFlagSet

flag.go:1266–1275  ·  flag.go::NewFlagSet

NewFlagSet returns a new, empty flag set with the specified name, error handling property and SortFlags set to true.

(name string, errorHandling ErrorHandling)

Source from the content-addressed store, hash-verified

1264// NewFlagSet returns a new, empty flag set with the specified name,
1265// error handling property and SortFlags set to true.
1266func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet {
1267 f := &FlagSet{
1268 name: name,
1269 errorHandling: errorHandling,
1270 argsLenAtDash: -1,
1271 interspersed: true,
1272 SortFlags: true,
1273 }
1274 return f
1275}
1276
1277// SetInterspersed sets whether to support interspersed option/non-option arguments.
1278func (f *FlagSet) SetInterspersed(interspersed bool) {

Callers 15

setUpDSFlagSetFunction · 0.85
setUpS2I64FlagSetFunction · 0.85
setUpIPSFlagSetFunction · 0.85
setUpIPNetFlagSetFunction · 0.85
setUpS2SFlagSetFunction · 0.85
setUpUISFlagSetFunction · 0.85

Calls

no outgoing calls

Tested by 15

setUpDSFlagSetFunction · 0.68
setUpS2I64FlagSetFunction · 0.68
setUpIPSFlagSetFunction · 0.68
setUpIPNetFlagSetFunction · 0.68
setUpS2SFlagSetFunction · 0.68
setUpUISFlagSetFunction · 0.68