aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bool_func.go2
-rw-r--r--func.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/bool_func.go b/bool_func.go
index 76422bf..83d77af 100644
--- a/bool_func.go
+++ b/bool_func.go
@@ -35,6 +35,6 @@ func BoolFunc(name string, usage string, fn func(string) error) {
}
// BoolFuncP is like BoolFunc, but accepts a shorthand letter that can be used after a single dash.
-func BoolFuncP(name, shorthand string, fn func(string) error, usage string) {
+func BoolFuncP(name, shorthand string, usage string, fn func(string) error) {
CommandLine.BoolFuncP(name, shorthand, usage, fn)
}
diff --git a/func.go b/func.go
index e5f5436..9f4d88f 100644
--- a/func.go
+++ b/func.go
@@ -27,11 +27,11 @@ func (f *FlagSet) FuncP(name string, shorthand string, usage string, fn func(str
//
// The callback function will be called every time "--{name}={value}" (or equivalent) is
// parsed on the command line, with "{value}" as an argument.
-func Func(name string, fn func(string) error, usage string) {
+func Func(name string, usage string, fn func(string) error) {
CommandLine.FuncP(name, "", usage, fn)
}
// FuncP is like Func, but accepts a shorthand letter that can be used after a single dash.
-func FuncP(name, shorthand string, fn func(string) error, usage string) {
+func FuncP(name, shorthand string, usage string, fn func(string) error) {
CommandLine.FuncP(name, shorthand, usage, fn)
}