Extend y7s node kind checks support
This commit is contained in:
@@ -6,6 +6,14 @@ import (
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func IsSeq(n *yaml.Node) bool {
|
||||
return n.Kind == yaml.SequenceNode
|
||||
}
|
||||
|
||||
func IsMapping(n *yaml.Node) bool {
|
||||
return n.Kind == yaml.MappingNode
|
||||
}
|
||||
|
||||
func IsKind(n *yaml.Node, tt ...yaml.Kind) bool {
|
||||
if n != nil {
|
||||
for _, t := range tt {
|
||||
|
||||
Reference in New Issue
Block a user