jet/internal/utils/is/is.go

11 lines
186 B
Go
Raw Normal View History

2023-07-21 14:11:31 +02:00
package is
2025-02-28 18:23:15 +01:00
import (
"reflect"
)
2023-07-21 14:11:31 +02:00
// Nil check if v is nil
func Nil(v interface{}) bool {
return v == nil || (reflect.ValueOf(v).Kind() == reflect.Ptr && reflect.ValueOf(v).IsNil())
}