Skip to content

Commit d25583f

Browse files
committed
IniParser: write 'func' options with "ini-name"
If a 'ini-name' tag is set on the option, write it to file even if the option is a function.
1 parent c0795c8 commit d25583f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ini.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func writeGroupIni(cmd *Command, group *Group, namespace string, writer io.Write
216216
comments := (options & IniIncludeComments) != IniNone
217217

218218
for _, option := range group.options {
219-
if option.isFunc() || option.Hidden {
219+
if option.Hidden || option.isFunc() && len(option.tag.Get("ini-name")) == 0 {
220220
continue
221221
}
222222

0 commit comments

Comments
 (0)