From 61a32b2d3266e9c3661aef6842ba4a1913da2df0 Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Wed, 15 Mar 2023 20:11:10 +0000 Subject: Fixes strings being wrapped in quotes twice when outputting --- walk/walk.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'walk') diff --git a/walk/walk.go b/walk/walk.go index d71ae44..33e5554 100644 --- a/walk/walk.go +++ b/walk/walk.go @@ -312,7 +312,7 @@ func jsonOutValue(in *WalkItemStream, indent int, doIndent bool) WalkValue { if !hasToken { panic("Missing JSON token in output") } - switch token.Value.(type) { + switch v := token.Value.(type) { case ValueNull: if doIndent { printIndent(indent) @@ -339,7 +339,7 @@ func jsonOutValue(in *WalkItemStream, indent int, doIndent bool) WalkValue { if doIndent { printIndent(indent) } - fmt.Printf("%q", token.Value) + fmt.Printf("%q", string(v)) return nil case TerminalValue: switch token.Value.(TerminalValue) { -- cgit v1.2.3