From a865d66b4f4c8f635c49cf513aeaf4c0ff24abd7 Mon Sep 17 00:00:00 2001 From: koba-e964 <3303362+koba-e964@users.noreply.github.com> Date: Sun, 3 Nov 2019 15:51:14 +0900 Subject: [PATCH] Stop treating top-level values specially --- yq.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/yq.go b/yq.go index c59128f1..3ec6774b 100644 --- a/yq.go +++ b/yq.go @@ -600,12 +600,7 @@ func toString(context interface{}) (string, error) { } func yamlToString(context interface{}) (string, error) { - switch context := context.(type) { - case string: - return context, nil - default: - return marshalContext(context) - } + return marshalContext(context) } func marshalContext(context interface{}) (string, error) {