package pflagimport// -- uint Valuetype uintValue uintfunc newUintValue( uint, *uint) *uintValue { * = return (*uintValue)()}func ( *uintValue) ( string) error { , := strconv.ParseUint(, 0, 64) * = uintValue()return}func ( *uintValue) () string {return"uint"}func ( *uintValue) () string { returnstrconv.FormatUint(uint64(*), 10) }func uintConv( string) (interface{}, error) { , := strconv.ParseUint(, 0, 0)if != nil {return0, }returnuint(), nil}// GetUint return the uint value of a flag with the given namefunc ( *FlagSet) ( string) (uint, error) { , := .getFlagType(, "uint", uintConv)if != nil {return0, }return .(uint), nil}// UintVar defines a uint flag with specified name, default value, and usage string.// The argument p points to a uint variable in which to store the value of the flag.func ( *FlagSet) ( *uint, string, uint, string) { .VarP(newUintValue(, ), , "", )}// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) ( *uint, , string, uint, string) { .VarP(newUintValue(, ), , , )}// UintVar defines a uint flag with specified name, default value, and usage string.// The argument p points to a uint variable in which to store the value of the flag.func ( *uint, string, uint, string) {CommandLine.VarP(newUintValue(, ), , "", )}// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash.func ( *uint, , string, uint, string) {CommandLine.VarP(newUintValue(, ), , , )}// Uint defines a uint flag with specified name, default value, and usage string.// The return value is the address of a uint variable that stores the value of the flag.func ( *FlagSet) ( string, uint, string) *uint { := new(uint) .UintVarP(, , "", , )return}// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) (, string, uint, string) *uint { := new(uint) .UintVarP(, , , , )return}// Uint defines a uint flag with specified name, default value, and usage string.// The return value is the address of a uint variable that stores the value of the flag.func ( string, uint, string) *uint {returnCommandLine.UintP(, "", , )}// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash.func (, string, uint, string) *uint {returnCommandLine.UintP(, , , )}
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.