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) {