diff options
| author | Tomas Aschan <[email protected]> | 2025-06-28 11:26:14 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-28 11:26:14 +0200 |
| commit | 1c62fb2813da5f1d1b893a49180a41b3f6be3262 (patch) | |
| tree | 289c9ab56575327b848a6dae879737cf9b1edb4d /bool_func.go | |
| parent | 8a6c85f2ae488081f953744f9edc414bac10ee45 (diff) | |
| parent | 1a4b5b2e5c7ee4a194cebc579bb34198187df73d (diff) | |
Merge pull request #431 from LeGEC/430-fix-usage-message-for-func-flags
fix usage message for func flags, fix arguments order
Diffstat (limited to 'bool_func.go')
| -rw-r--r-- | bool_func.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bool_func.go b/bool_func.go index 05783a9..83d77af 100644 --- a/bool_func.go +++ b/bool_func.go @@ -5,7 +5,7 @@ type boolfuncValue func(string) error func (f boolfuncValue) Set(s string) error { return f(s) } -func (f boolfuncValue) Type() string { return "func" } +func (f boolfuncValue) Type() string { return "boolfunc" } func (f boolfuncValue) String() string { return "" } // same behavior as stdlib 'flag' package @@ -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) } |
