gitlab.com/evatix-go/core@v1.3.55/coredata/coredynamic/ZeroSetAny.go (about) 1 package coredynamic 2 3 import ( 4 "reflect" 5 6 "gitlab.com/evatix-go/core/internal/reflectinternal" 7 ) 8 9 // ZeroSetAny 10 // 11 // Sets empty bytes to the struct or the value but don't make it nil. 12 // 13 // It only makes all fields to nil or zero values. 14 // 15 // Warning : 16 // - Must be set as a pointer any. 17 func ZeroSetAny(anyItem interface{}) { 18 if reflectinternal.IsNull(anyItem) { 19 return 20 } 21 22 SafeZeroSet(reflect.ValueOf(anyItem)) 23 }