Skip to content

Commit

Permalink
IniParser: write 'func' options with "ini-name"
Browse files Browse the repository at this point in the history
If a 'ini-name' tag is set on the option, write it to file even if the
option is a function.
  • Loading branch information
cdevienne committed Dec 12, 2019
1 parent c0795c8 commit d25583f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ini.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func writeGroupIni(cmd *Command, group *Group, namespace string, writer io.Write
comments := (options & IniIncludeComments) != IniNone

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

Expand Down

0 comments on commit d25583f

Please sign in to comment.