From fa6b183db46a9a9a978455704957e191c99c4a3d Mon Sep 17 00:00:00 2001 From: glorv Date: Tue, 13 Oct 2020 20:02:03 +0800 Subject: [PATCH] trim leading and suffix '" --- lightning/config/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lightning/config/config.go b/lightning/config/config.go index b2c68083a..1715f0cba 100644 --- a/lightning/config/config.go +++ b/lightning/config/config.go @@ -136,7 +136,8 @@ const ( ) func (t *PostOpLevel) UnmarshalText(text []byte) error { - switch strings.ToLower(string(text)) { + + switch strings.ToLower(strings.Trim(string(text), `'"`)) { case "off", "false": *t = OpLevelOff case "required", "true":