package pflagimport// -- uint8 Valuetype uint8Value uint8func newUint8Value( uint8, *uint8) *uint8Value { * = return (*uint8Value)()}func ( *uint8Value) ( string) error { , := strconv.ParseUint(, 0, 8) * = uint8Value()return}func ( *uint8Value) () string {return"uint8"}func ( *uint8Value) () string { returnstrconv.FormatUint(uint64(*), 10) }func uint8Conv( string) (interface{}, error) { , := strconv.ParseUint(, 0, 8)if != nil {return0, }returnuint8(), nil}// GetUint8 return the uint8 value of a flag with the given namefunc ( *FlagSet) ( string) (uint8, error) { , := .getFlagType(, "uint8", uint8Conv)if != nil {return0, }return .(uint8), nil}// Uint8Var defines a uint8 flag with specified name, default value, and usage string.// The argument p points to a uint8 variable in which to store the value of the flag.func ( *FlagSet) ( *uint8, string, uint8, string) { .VarP(newUint8Value(, ), , "", )}// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) ( *uint8, , string, uint8, string) { .VarP(newUint8Value(, ), , , )}// Uint8Var defines a uint8 flag with specified name, default value, and usage string.// The argument p points to a uint8 variable in which to store the value of the flag.func ( *uint8, string, uint8, string) {CommandLine.VarP(newUint8Value(, ), , "", )}// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash.func ( *uint8, , string, uint8, string) {CommandLine.VarP(newUint8Value(, ), , , )}// Uint8 defines a uint8 flag with specified name, default value, and usage string.// The return value is the address of a uint8 variable that stores the value of the flag.func ( *FlagSet) ( string, uint8, string) *uint8 { := new(uint8) .Uint8VarP(, , "", , )return}// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) (, string, uint8, string) *uint8 { := new(uint8) .Uint8VarP(, , , , )return}// Uint8 defines a uint8 flag with specified name, default value, and usage string.// The return value is the address of a uint8 variable that stores the value of the flag.func ( string, uint8, string) *uint8 {returnCommandLine.Uint8P(, "", , )}// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash.func (, string, uint8, string) *uint8 {returnCommandLine.Uint8P(, , , )}
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.