goccy decoder supports merge maps

This commit is contained in:
Mike Farah
2025-05-03 20:20:50 +10:00
parent f89605e3c0
commit 72fa3cca98
3 changed files with 23 additions and 8 deletions
+6 -1
View File
@@ -167,8 +167,13 @@ func (o *CandidateNode) UnmarshalGoccyYAML(node ast.Node, cm yaml.CommentMap, an
o.Value = aliasNode.Value.String()
o.Alias = anchorMap[o.Value]
case ast.MergeKeyType:
log.Debugf("UnmarshalYAML - a merge key")
o.Kind = ScalarNode
o.Value = "<<"
default:
log.Debugf("UnmarshalYAML - node idea of the type!!")
log.Debugf("UnmarshalYAML - no idea of the type!!\n%v: %v", node.Type(), node.String())
}
log.Debugf("KIND: %v", o.Kind)
return nil