mirror of
https://github.com/spf13/cobra
synced 2025-07-07 19:47:18 +00:00
Fix function names in writeFlagHandler
The references to the `__handle_filename_extension_flag` and `__handle_subdirs_in_dir_flag` functions in `writeFlagHandler` hadn't been updated correctly in the previous commits. Signed-off-by: John McCabe <john@johnmccabe.net>
This commit is contained in:
parent
4a60e13b9c
commit
39acf2d7e7
1 changed files with 2 additions and 2 deletions
|
@ -311,7 +311,7 @@ func writeFlagHandler(buf *bytes.Buffer, name string, annotations map[string][]s
|
||||||
|
|
||||||
var ext string
|
var ext string
|
||||||
if len(value) > 0 {
|
if len(value) > 0 {
|
||||||
ext = "__%[1]s_handle_filename_extension_flag " + strings.Join(value, "|")
|
ext = fmt.Sprintf("__%s_handle_filename_extension_flag ", name) + strings.Join(value, "|")
|
||||||
} else {
|
} else {
|
||||||
ext = "_filedir"
|
ext = "_filedir"
|
||||||
}
|
}
|
||||||
|
@ -329,7 +329,7 @@ func writeFlagHandler(buf *bytes.Buffer, name string, annotations map[string][]s
|
||||||
|
|
||||||
var ext string
|
var ext string
|
||||||
if len(value) == 1 {
|
if len(value) == 1 {
|
||||||
ext = "__%[1]s_handle_subdirs_in_dir_flag " + value[0]
|
ext = fmt.Sprintf("__%s_handle_subdirs_in_dir_flag ", name) + value[0]
|
||||||
} else {
|
} else {
|
||||||
ext = "_filedir -d"
|
ext = "_filedir -d"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue