Bump k8s.io/kube-openapi

Updates to preserve openapi ipv4 validation compatibility with pre-go1.17 behavior
This commit is contained in:
Jordan Liggitt
2021-08-17 10:13:40 -04:00
parent fc5863b8b2
commit b15c2130aa
54 changed files with 306 additions and 131 deletions

View File

@@ -46,6 +46,24 @@ func AllPtrFieldsNil(obj interface{}) bool {
return true
}
// Int returns a pointer to an int
func Int(i int) *int {
return &i
}
var IntPtr = Int // for back-compat
// IntDeref dereferences the int ptr and returns it if not nil, or else
// returns def.
func IntDeref(ptr *int, def int) int {
if ptr != nil {
return *ptr
}
return def
}
var IntPtrDerefOr = IntDeref // for back-compat
// Int32 returns a pointer to an int32.
func Int32(i int32) *int32 {
return &i