mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-07 22:35:37 +00:00
Stop treating top-level values specially
This commit is contained in:
parent
b6da773dde
commit
a865d66b4f
7
yq.go
7
yq.go
@ -600,12 +600,7 @@ func toString(context interface{}) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func yamlToString(context interface{}) (string, error) {
|
func yamlToString(context interface{}) (string, error) {
|
||||||
switch context := context.(type) {
|
return marshalContext(context)
|
||||||
case string:
|
|
||||||
return context, nil
|
|
||||||
default:
|
|
||||||
return marshalContext(context)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func marshalContext(context interface{}) (string, error) {
|
func marshalContext(context interface{}) (string, error) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user