MCPcopy Create free account
hub / github.com/google/gapid / safeValue

Function safeValue

core/event/function.go:66–71  ·  view source on GitHub ↗
(v interface{}, t reflect.Type)

Source from the content-addressed store, hash-verified

64}
65
66func safeValue(v interface{}, t reflect.Type) reflect.Value {
67 if v == nil {
68 return reflect.Zero(t)
69 }
70 return reflect.ValueOf(v)
71}
72
73func safeObject(v reflect.Value) interface{} {
74 if v.IsNil() {

Callers 2

funcToHandlerFunction · 0.85
funcToPredicateFunction · 0.85

Calls 1

ZeroMethod · 0.45

Tested by

no test coverage detected