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

Method Get

script/utils.go:96–106  ·  view source on GitHub ↗
(prop string)

Source from the content-addressed store, hash-verified

94}
95
96func (v *Value) Get(prop string) *Value {
97 obj := v.object()
98 if obj == nil {
99 return nil
100 }
101 ov, e := obj.Get(prop)
102 if e != nil {
103 return nil
104 }
105 return newValue(v.vm, ov)
106}
107
108func (v *Value) Has(prop string) bool {
109 return !v.Get(prop).IsNil()

Callers 1

HasMethod · 0.95

Calls 3

objectMethod · 0.95
newValueFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected