// Test if the named flag is a boolean flag. func isBooleanShortFlag(name string, f *flag.FlagSet) bool { result := false f.VisitAll(func(f *flag.Flag) { if f.Shorthand == name && f.Value.Type() == "bool" { result = true } }) return result }