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

Method parseShortArg

flag.go:1116–1129  ·  view source on GitHub ↗
(s string, args []string, fn parseFunc)

Source from the content-addressed store, hash-verified

1114}
1115
1116func (f *FlagSet) parseShortArg(s string, args []string, fn parseFunc) (a []string, err error) {
1117 a = args
1118 shorthands := s[1:]
1119
1120 // "shorthands" can be a series of shorthand letters of flags (e.g. "-vvv").
1121 for len(shorthands) > 0 {
1122 shorthands, a, err = f.parseSingleShortArg(shorthands, args, fn)
1123 if err != nil {
1124 return
1125 }
1126 }
1127
1128 return
1129}
1130
1131func (f *FlagSet) parseArgs(args []string, fn parseFunc) (err error) {
1132 for len(args) > 0 {

Callers 1

parseArgsMethod · 0.95

Calls 1

parseSingleShortArgMethod · 0.95

Tested by

no test coverage detected