github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/pkg/helper/nilinterface.go (about) 1 package helper 2 3 import "reflect" 4 5 func IsNil(sth interface{}) bool { 6 return sth == nil || reflect.ValueOf(sth).Kind() == reflect.Ptr && reflect.ValueOf(sth).IsNil() 7 }