package pflagimport// -- int64 Valuetype int64Value int64func newInt64Value( int64, *int64) *int64Value { * = return (*int64Value)()}func ( *int64Value) ( string) error { , := strconv.ParseInt(, 0, 64) * = int64Value()return}func ( *int64Value) () string {return"int64"}func ( *int64Value) () string { returnstrconv.FormatInt(int64(*), 10) }func int64Conv( string) (interface{}, error) {returnstrconv.ParseInt(, 0, 64)}// GetInt64 return the int64 value of a flag with the given namefunc ( *FlagSet) ( string) (int64, error) { , := .getFlagType(, "int64", int64Conv)if != nil {return0, }return .(int64), nil}// Int64Var defines an int64 flag with specified name, default value, and usage string.// The argument p points to an int64 variable in which to store the value of the flag.func ( *FlagSet) ( *int64, string, int64, string) { .VarP(newInt64Value(, ), , "", )}// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) ( *int64, , string, int64, string) { .VarP(newInt64Value(, ), , , )}// Int64Var defines an int64 flag with specified name, default value, and usage string.// The argument p points to an int64 variable in which to store the value of the flag.func ( *int64, string, int64, string) {CommandLine.VarP(newInt64Value(, ), , "", )}// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash.func ( *int64, , string, int64, string) {CommandLine.VarP(newInt64Value(, ), , , )}// Int64 defines an int64 flag with specified name, default value, and usage string.// The return value is the address of an int64 variable that stores the value of the flag.func ( *FlagSet) ( string, int64, string) *int64 { := new(int64) .Int64VarP(, , "", , )return}// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) (, string, int64, string) *int64 { := new(int64) .Int64VarP(, , , , )return}// Int64 defines an int64 flag with specified name, default value, and usage string.// The return value is the address of an int64 variable that stores the value of the flag.func ( string, int64, string) *int64 {returnCommandLine.Int64P(, "", , )}// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash.func (, string, int64, string) *int64 {returnCommandLine.Int64P(, , , )}
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.