MCPcopy Create free account
hub / github.com/cloudwan/gohan / MapToValue

Function MapToValue

extension/gohanscript/stmt.go:241–250  ·  view source on GitHub ↗

MapToValue converts interface map to value map

(a map[string]interface{})

Source from the content-addressed store, hash-verified

239
240//MapToValue converts interface map to value map
241func 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
253func MappingNodeToMap(node *yaml.Node) (result map[string]*yaml.Node) {

Callers 3

includeFunction · 0.85
NewStmtFunction · 0.85
parserMethod · 0.85

Calls 1

NewValueFunction · 0.85

Tested by

no test coverage detected