()
| 11 | ) |
| 12 | |
| 13 | func ExampleShorthandLookup() { |
| 14 | name := "verbose" |
| 15 | short := name[:1] |
| 16 | |
| 17 | pflag.BoolP(name, short, false, "verbose output") |
| 18 | |
| 19 | // len(short) must be == 1 |
| 20 | flag := pflag.ShorthandLookup(short) |
| 21 | |
| 22 | fmt.Println(flag.Name) |
| 23 | } |
| 24 | |
| 25 | func ExampleFlagSet_ShorthandLookup() { |
| 26 | name := "verbose" |
nothing calls this directly
no test coverage detected