MCPcopy Index your code
hub / github.com/expr-lang/expr / unpackValue

Method unpackValue

internal/spew/dump.go:73–78  ·  view source on GitHub ↗

unpackValue returns values inside of non-nil interfaces when possible. This is useful for data types like structs, arrays, slices, and maps which can contain varying types packed inside an interface.

(v reflect.Value)

Source from the content-addressed store, hash-verified

71// This is useful for data types like structs, arrays, slices, and maps which
72// can contain varying types packed inside an interface.
73func (d *dumpState) unpackValue(v reflect.Value) reflect.Value {
74 if v.Kind() == reflect.Interface && !v.IsNil() {
75 v = v.Elem()
76 }
77 return v
78}
79
80// dumpPtr handles formatting of pointers by indirecting them as necessary.
81func (d *dumpState) dumpPtr(v reflect.Value) {

Callers 2

dumpSliceMethod · 0.95
dumpMethod · 0.95

Calls 1

ElemMethod · 0.80

Tested by

no test coverage detected