MCPcopy Create free account
hub / github.com/devld/go-drive / M

Method M

script/utils.go:166–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164}
165
166func (v *Value) M() types.M {
167 if v.IsNil() {
168 return nil
169 }
170 obj := v.object()
171 if obj == nil {
172 return nil
173 }
174 r := make(types.M)
175
176 for _, k := range obj.Keys() {
177 p, e := obj.Get(k)
178 if e != nil {
179 v.vm.ThrowTypeError(e.Error())
180 }
181 r[k], _ = p.Export()
182 }
183 return r
184}
185
186func (v *Value) ParseInto(dest any) {
187 defer func() {

Callers

nothing calls this directly

Calls 6

IsNilMethod · 0.95
objectMethod · 0.95
KeysMethod · 0.80
ThrowTypeErrorMethod · 0.80
GetMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected