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 /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 'func.go')
| -rw-r--r-- | func.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) } |
