package pflag// -- func Valuetype funcValue func(string) errorfunc ( funcValue) ( string) error { return () }func ( funcValue) () string { return"func" }func ( funcValue) () string { return"" } // same behavior as stdlib 'flag' package// Func defines a func flag with specified name, callback function and usage string.//// The callback function will be called every time "--{name}={value}" (or equivalent) is// parsed on the command line, with "{value}" as an argument.func ( *FlagSet) ( string, string, func(string) error) { .FuncP(, "", , )}// FuncP is like Func, but accepts a shorthand letter that can be used after a single dash.func ( *FlagSet) ( string, string, string, func(string) error) {varValue = funcValue() .VarP(, , , )}// Func defines a func flag with specified name, callback function and usage string.//// The callback function will be called every time "--{name}={value}" (or equivalent) is// parsed on the command line, with "{value}" as an argument.func ( string, string, func(string) error) {CommandLine.FuncP(, "", , )}// FuncP is like Func, but accepts a shorthand letter that can be used after a single dash.func (, string, string, func(string) error) {CommandLine.FuncP(, , , )}
The pages are generated with Goldsv0.8.7. (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.