MapToValue converts interface map to value map
(a map[string]interface{})
| 239 | |
| 240 | //MapToValue converts interface map to value map |
| 241 | func MapToValue(a map[string]interface{}) (result map[string]Value, err error) { |
| 242 | result = map[string]Value{} |
| 243 | if a == nil { |
| 244 | return |
| 245 | } |
| 246 | for key, value := range a { |
| 247 | result[key], err = NewValue(value) |
| 248 | } |
| 249 | return |
| 250 | } |
| 251 | |
| 252 | //MappingNodeToMap convert yaml node to map |
| 253 | func MappingNodeToMap(node *yaml.Node) (result map[string]*yaml.Node) { |