(node *yaml.Node, key, value, tag string)
| 177 | } |
| 178 | |
| 179 | func ensureMappingScalar(node *yaml.Node, key, value, tag string) { |
| 180 | if node == nil || node.Kind != yaml.MappingNode { |
| 181 | return |
| 182 | } |
| 183 | for i := 0; i+1 < len(node.Content); i += 2 { |
| 184 | if node.Content[i] != nil && node.Content[i].Value == key { |
| 185 | return |
| 186 | } |
| 187 | } |
| 188 | node.Content = append(node.Content, |
| 189 | &yaml.Node{Kind: yaml.ScalarNode, Tag: "!!str", Value: key}, |
| 190 | &yaml.Node{Kind: yaml.ScalarNode, Tag: tag, Value: value}, |
| 191 | ) |
| 192 | } |
| 193 | |
| 194 | func boolYAMLValue(v bool) string { |
| 195 | if v { |
no outgoing calls
no test coverage detected