MCPcopy Index your code
hub / github.com/cortexlabs/cortex / IndirectSafe

Function IndirectSafe

pkg/lib/pointer/pointer.go:69–74  ·  view source on GitHub ↗

IndirectSafe dereferences if obj is a pointer, otherwise no-op

(obj interface{})

Source from the content-addressed store, hash-verified

67
68// IndirectSafe dereferences if obj is a pointer, otherwise no-op
69func IndirectSafe(obj interface{}) interface{} {
70 if obj == nil {
71 return nil
72 }
73 return reflect.Indirect(reflect.ValueOf(obj)).Interface()
74}

Callers 2

FlattenAllStrValuesFunction · 0.92
TestIndirectSafeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIndirectSafeFunction · 0.68