Break utils package into subpackages.

This commit is contained in:
go-jet 2023-07-21 14:11:31 +02:00
parent 06ecd73f67
commit d7a5adb239
25 changed files with 276 additions and 318 deletions

8
internal/utils/is/is.go Normal file
View file

@ -0,0 +1,8 @@
package is
import "reflect"
// Nil check if v is nil
func Nil(v interface{}) bool {
return v == nil || (reflect.ValueOf(v).Kind() == reflect.Ptr && reflect.ValueOf(v).IsNil())
}