SequenceToStrings converts a sequence of Scalars to a string slice
(n *yaml.Node)
| 423 | |
| 424 | // SequenceToStrings converts a sequence of Scalars to a string slice |
| 425 | func SequenceToStrings(n *yaml.Node) []string { |
| 426 | if n == nil || n.Content == nil { |
| 427 | return []string{} |
| 428 | } |
| 429 | ss := []string{} |
| 430 | for _, v := range n.Content { |
| 431 | ss = append(ss, v.Value) |
| 432 | } |
| 433 | return ss |
| 434 | } |
| 435 | |
| 436 | // DecodeMap converts a node to a string map |
| 437 | func DecodeMap(n *yaml.Node) map[string]any { |
no outgoing calls
no test coverage detected