MCPcopy
hub / github.com/go-gorm/gorm / eqNil

Function eqNil

clause/expression.go:367–373  ·  view source on GitHub ↗
(value interface{})

Source from the content-addressed store, hash-verified

365}
366
367func eqNil(value interface{}) bool {
368 if valuer, ok := value.(driver.Valuer); ok && !eqNilReflect(valuer) {
369 value, _ = valuer.Value()
370 }
371
372 return value == nil || eqNilReflect(value)
373}
374
375func eqNilReflect(value interface{}) bool {
376 reflectValue := reflect.ValueOf(value)

Callers 2

BuildMethod · 0.85
BuildMethod · 0.85

Calls 2

eqNilReflectFunction · 0.85
ValueMethod · 0.65

Tested by

no test coverage detected