From 9d929f81e8edc8499fce3214d68edb4b3144ab39 Mon Sep 17 00:00:00 2001 From: Alexandre Pauzies Date: Sun, 12 Nov 2017 19:56:42 -0500 Subject: [PATCH] Keys should not consider themself for transformation. --- key.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/key.go b/key.go index ab566c2..d3eac47 100644 --- a/key.go +++ b/key.go @@ -114,7 +114,7 @@ func (k *Key) transformValue(val string) string { // Search in the same section. nk, err := k.s.GetKey(noption) - if err != nil { + if err != nil || k == nk { // Search again in default section. nk, _ = k.s.f.Section("").GetKey(noption) }