()
| 23 | } |
| 24 | |
| 25 | func ExampleFlagSet_ShorthandLookup() { |
| 26 | name := "verbose" |
| 27 | short := name[:1] |
| 28 | |
| 29 | fs := pflag.NewFlagSet("Example", pflag.ContinueOnError) |
| 30 | fs.BoolP(name, short, false, "verbose output") |
| 31 | |
| 32 | // len(short) must be == 1 |
| 33 | flag := fs.ShorthandLookup(short) |
| 34 | |
| 35 | fmt.Println(flag.Name) |
| 36 | } |
nothing calls this directly
no test coverage detected