From d25583f885bb61e62f0470bd81b0042c9f284c4c Mon Sep 17 00:00:00 2001 From: Christophe de Vienne Date: Thu, 12 Dec 2019 11:31:18 +0100 Subject: [PATCH] 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. --- ini.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ini.go b/ini.go index e714d3d..84ba5c3 100644 --- a/ini.go +++ b/ini.go @@ -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 }