DecodeMap converts a node to a string map
(n *yaml.Node)
| 435 | |
| 436 | // DecodeMap converts a node to a string map |
| 437 | func 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 |
| 450 | func EncodeMap(m any) string { |
no test coverage detected