MCPcopy Index your code
hub / github.com/TomWright/dasel / FromMap

Function FromMap

model/orderedmap/map.go:26–32  ·  view source on GitHub ↗

FromMap creates a *Map from the input map. Note that while the contents will be ordered, the ordering is not guaranteed since the input map is unordered.

(source map[string]any)

Source from the content-addressed store, hash-verified

24// Note that while the contents will be ordered, the ordering is not
25// guaranteed since the input map is unordered.
26func FromMap(source map[string]any) *Map {
27 m := NewMap()
28 for k, v := range source {
29 m.Set(k, v)
30 }
31 return m
32}
33
34// Map is a map implementation that maintains ordering of keys.
35type Map struct {

Callers 1

TestFromMapFunction · 0.92

Calls 2

SetMethod · 0.95
NewMapFunction · 0.85

Tested by 1

TestFromMapFunction · 0.74