Treat empty strings as string type instead of null type

This commit is contained in:
Morten Torkildsen
2020-06-05 15:04:18 -07:00
parent 1c2eaa9d29
commit 4fca00014c
2 changed files with 5 additions and 1 deletions

View File

@@ -70,6 +70,9 @@ func IsYaml1_1NonString(node *Node) bool {
}
func IsValueNonString(value string) bool {
if value == "" {
return false
}
if strings.Contains(value, "\n") {
// multi-line strings will fail to unmarshal
return false