MCPcopy
hub / github.com/go-yaml/yaml / isStringMap

Function isStringMap

decode.go:864–876  ·  view source on GitHub ↗
(n *Node)

Source from the content-addressed store, hash-verified

862}
863
864func isStringMap(n *Node) bool {
865 if n.Kind != MappingNode {
866 return false
867 }
868 l := len(n.Content)
869 for i := 0; i < l; i += 2 {
870 shortTag := n.Content[i].ShortTag()
871 if shortTag != strTag && shortTag != mergeTag {
872 return false
873 }
874 }
875 return true
876}
877
878func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) {
879 sinfo, err := getStructInfo(out.Type())

Callers 1

mappingMethod · 0.85

Calls 1

ShortTagMethod · 0.80

Tested by

no test coverage detected