MCPcopy Create free account
hub / github.com/aws-cloudformation/rain / DecodeMap

Function DecodeMap

internal/node/node.go:437–447  ·  view source on GitHub ↗

DecodeMap converts a node to a string map

(n *yaml.Node)

Source from the content-addressed store, hash-verified

435
436// DecodeMap converts a node to a string map
437func DecodeMap(n *yaml.Node) map[string]any {
438 var m map[string]any
439 if n != nil {
440 decodeErr := n.Decode(&m)
441 if decodeErr != nil {
442 config.Debugf("DecodeMap error: %v", decodeErr)
443 return m
444 }
445 }
446 return m
447}
448
449// EncodeMap attempts to convert an interface to a yaml node
450func EncodeMap(m any) string {

Callers 7

PropertiesMethod · 0.92
OverridesMethod · 0.92
OutputsMethod · 0.92
ParametersMethod · 0.92
ResourcesMethod · 0.92
ModulesMethod · 0.92
ConditionsMethod · 0.92

Calls 1

DebugfFunction · 0.92

Tested by

no test coverage detected