func (f *FlagSet) ShorthandLookup(name string) *Flag {
	if name == "" {
		return nil
	}
	if len(name) > 1 {
		msg := fmt.Sprintf("can not look up shorthand which is more than one ASCII character: %q", name)
		fmt.Fprintf(f.out(), msg)
		panic(msg)
	}
	c := name[0]
	return f.shorthands[c]
}
ShorthandLookup returns the Flag structure of the short handed flag,
returning nil if none exists.
It panics, if len(name) > 1.
package pflag
import (
	"bytes"
	"errors"
	goflag "flag"
	"fmt"
	"io"
	"os"
	"sort"
	"strings"
)
var ErrHelp = errors.New("pflag: help requested")
type ErrorHandling int
const (
	ContinueOnError ErrorHandling = iota
	ExitOnError
	PanicOnError
)
type ParseErrorsWhitelist struct {
	UnknownFlags bool
}
type NormalizedName string
type FlagSet struct {
	Usage func()
	SortFlags bool
	ParseErrorsWhitelist ParseErrorsWhitelist
	name              string
	parsed            bool
	actual            map[NormalizedName]*Flag
	orderedActual     []*Flag
	sortedActual      []*Flag
	formal            map[NormalizedName]*Flag
	orderedFormal     []*Flag
	sortedFormal      []*Flag
	shorthands        map[byte]*Flag
	args              []string  
	argsLenAtDash     int       
	errorHandling     ErrorHandling
	output            io.Writer  
	interspersed      bool       
	normalizeNameFunc func(f *FlagSet, name string) NormalizedName
	addedGoFlagSets []*goflag.FlagSet
}
type Flag struct {
	Name                string               
	Shorthand           string               
	Usage               string               
	Value               Value                
	DefValue            string               
	Changed             bool                 
	NoOptDefVal         string               
	Deprecated          string               
	Hidden              bool                 
	ShorthandDeprecated string               
	Annotations         map[string][]string  
}
type Value interface {
	String() string
	Set(string) error
	Type() string
}
func sortFlags(flags map[NormalizedName]*Flag) []*Flag {
	list := make(sort.StringSlice, len(flags))
	i := 0
	for k := range flags {
		list[i] = string(k)
		i++
	}
	list.Sort()
	result := make([]*Flag, len(list))
	for i, name := range list {
		result[i] = flags[NormalizedName(name)]
	}
	return result
}
func (f *FlagSet) SetNormalizeFunc(n func(f *FlagSet, name string) NormalizedName) {
	f.normalizeNameFunc = n
	f.sortedFormal = f.sortedFormal[:0]
	for fname, flag := range f.formal {
		nname := f.normalizeFlagName(flag.Name)
		if fname == nname {
			continue
		}
		flag.Name = string(nname)
		delete(f.formal, fname)
		f.formal[nname] = flag
		if _, set := f.actual[fname]; set {
			delete(f.actual, fname)
			f.actual[nname] = flag
		}
	}
}
func (f *FlagSet) GetNormalizeFunc() func(f *FlagSet, name string) NormalizedName {
	if f.normalizeNameFunc != nil {
		return f.normalizeNameFunc
	}
	return func(f *FlagSet, name string) NormalizedName { return NormalizedName(name) }
}
func (f *FlagSet) normalizeFlagName(name string) NormalizedName {
	n := f.GetNormalizeFunc()
	return n(f, name)
}
func (f *FlagSet) out() io.Writer {
	if f.output == nil {
		return os.Stderr
	}
	return f.output
}
func (f *FlagSet) SetOutput(output io.Writer) {
	f.output = output
}
func (f *FlagSet) VisitAll(fn func(*Flag)) {
	if len(f.formal) == 0 {
		return
	}
	var flags []*Flag
	if f.SortFlags {
		if len(f.formal) != len(f.sortedFormal) {
			f.sortedFormal = sortFlags(f.formal)
		}
		flags = f.sortedFormal
	} else {
		flags = f.orderedFormal
	}
	for _, flag := range flags {
		fn(flag)
	}
}
func (f *FlagSet) HasFlags() bool {
	return len(f.formal) > 0
}
func (f *FlagSet) HasAvailableFlags() bool {
	for _, flag := range f.formal {
		if !flag.Hidden {
			return true
		}
	}
	return false
}
func VisitAll(fn func(*Flag)) {
	CommandLine.VisitAll(fn)
}
func (f *FlagSet) Visit(fn func(*Flag)) {
	if len(f.actual) == 0 {
		return
	}
	var flags []*Flag
	if f.SortFlags {
		if len(f.actual) != len(f.sortedActual) {
			f.sortedActual = sortFlags(f.actual)
		}
		flags = f.sortedActual
	} else {
		flags = f.orderedActual
	}
	for _, flag := range flags {
		fn(flag)
	}
}
func Visit(fn func(*Flag)) {
	CommandLine.Visit(fn)
}
func (f *FlagSet) Lookup(name string) *Flag {
	return f.lookup(f.normalizeFlagName(name))
}