MCPcopy
hub / github.com/lxn/walk / Value

Method Value

expression.go:30–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30func (re *reflectExpression) Value() interface{} {
31 rootVal := re.root.Value()
32 if rootVal == nil {
33 return nil
34 }
35
36 _, val, err := reflectValueFromPath(reflect.ValueOf(rootVal), re.path)
37 if err != nil {
38 log.Print("walk - reflectExpression.Value - Error: ", err.Error())
39 }
40
41 if !val.IsValid() {
42 return nil
43 }
44
45 return val.Interface()
46}
47
48func (re *reflectExpression) Changed() *Event {
49 return re.root.Changed()

Callers

nothing calls this directly

Calls 4

reflectValueFromPathFunction · 0.85
PrintMethod · 0.80
ValueMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected