From cec5198500fea3b617ca8563182740e25042cc5d Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Tue, 23 Oct 2018 17:34:23 +0800 Subject: [PATCH] Add files via upload --- goini.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/goini.go b/goini.go index 29cba73..81d61bb 100644 --- a/goini.go +++ b/goini.go @@ -33,6 +33,10 @@ func (ini *GoINI) String() string { } for _, key := range ini.GetNameKeys(name, "") { nameValue := ini.GetString(name, key, "") + if ok, _ := regexp.MatchString("^\\s|\\s$", nameValue); ok { + iniLines = append(iniLines, key+" = \""+nameValue+"\"") + continue + } nameValueLen := len(nameValue) if nameValueLen >= 2 && ((nameValue[0] == 34 && nameValue[nameValueLen-1] == 34) ||