package pflagimport// -- int8 Valuetype int8Value int8func newInt8Value( int8, *int8) *int8Value { * = return (*int8Value)()}func ( *int8Value) ( string) error { , := strconv.ParseInt(, 0, 8) * = int8Value()return}func ( *int8Value) () string {return"int8"}func ( *int8Value) () string { returnstrconv.FormatInt(int64(*), 10) }func int8Conv( string) (interface{}, error) { , := strconv.ParseInt(, 0, 8)if != nil {return0, }returnint8(), nil}// GetInt8 return the int8 value of a flag with the given namefunc ( *FlagSet) ( string) (int8, error) { , := .getFlagType(, "int8", int8Conv)if != nil {return0, }return .(int8), nil}// Int8Var defines an int8 flag with specified name, default value, and usage string.// The argument p points to an int8 variable in which to store the value of the flag.func ( *FlagSet) ( *int8, string, int8, string) { .VarP(newInt8Value(, ), , "", )}// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) ( *int8, , string, int8, string) { .VarP(newInt8Value(, ), , , )}// Int8Var defines an int8 flag with specified name, default value, and usage string.// The argument p points to an int8 variable in which to store the value of the flag.func ( *int8, string, int8, string) {CommandLine.VarP(newInt8Value(, ), , "", )}// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash.func ( *int8, , string, int8, string) {CommandLine.VarP(newInt8Value(, ), , , )}// Int8 defines an int8 flag with specified name, default value, and usage string.// The return value is the address of an int8 variable that stores the value of the flag.func ( *FlagSet) ( string, int8, string) *int8 { := new(int8) .Int8VarP(, , "", , )return}// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) (, string, int8, string) *int8 { := new(int8) .Int8VarP(, , , , )return}// Int8 defines an int8 flag with specified name, default value, and usage string.// The return value is the address of an int8 variable that stores the value of the flag.func ( string, int8, string) *int8 {returnCommandLine.Int8P(, "", , )}// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash.func (, string, int8, string) *int8 {returnCommandLine.Int8P(, , , )}
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.