package pflagimport// -- int16 Valuetype int16Value int16func newInt16Value( int16, *int16) *int16Value { * = return (*int16Value)()}func ( *int16Value) ( string) error { , := strconv.ParseInt(, 0, 16) * = int16Value()return}func ( *int16Value) () string {return"int16"}func ( *int16Value) () string { returnstrconv.FormatInt(int64(*), 10) }func int16Conv( string) (interface{}, error) { , := strconv.ParseInt(, 0, 16)if != nil {return0, }returnint16(), nil}// GetInt16 returns the int16 value of a flag with the given namefunc ( *FlagSet) ( string) (int16, error) { , := .getFlagType(, "int16", int16Conv)if != nil {return0, }return .(int16), nil}// Int16Var defines an int16 flag with specified name, default value, and usage string.// The argument p points to an int16 variable in which to store the value of the flag.func ( *FlagSet) ( *int16, string, int16, string) { .VarP(newInt16Value(, ), , "", )}// Int16VarP is like Int16Var, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) ( *int16, , string, int16, string) { .VarP(newInt16Value(, ), , , )}// Int16Var defines an int16 flag with specified name, default value, and usage string.// The argument p points to an int16 variable in which to store the value of the flag.func ( *int16, string, int16, string) {CommandLine.VarP(newInt16Value(, ), , "", )}// Int16VarP is like Int16Var, but accepts a shorthand letter that can be used after a single dash.func ( *int16, , string, int16, string) {CommandLine.VarP(newInt16Value(, ), , , )}// Int16 defines an int16 flag with specified name, default value, and usage string.// The return value is the address of an int16 variable that stores the value of the flag.func ( *FlagSet) ( string, int16, string) *int16 { := new(int16) .Int16VarP(, , "", , )return}// Int16P is like Int16, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) (, string, int16, string) *int16 { := new(int16) .Int16VarP(, , , , )return}// Int16 defines an int16 flag with specified name, default value, and usage string.// The return value is the address of an int16 variable that stores the value of the flag.func ( string, int16, string) *int16 {returnCommandLine.Int16P(, "", , )}// Int16P is like Int16, but accepts a shorthand letter that can be used after a single dash.func (, string, int16, string) *int16 {returnCommandLine.Int16P(, , , )}
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.