move recorder to interface
This commit is contained in:
17
pkg/util/util.go
Normal file
17
pkg/util/util.go
Normal file
@ -0,0 +1,17 @@
|
||||
package util
|
||||
|
||||
import "k8s.io/utils/ptr"
|
||||
|
||||
func DerefStr(s *string) string {
|
||||
if s == nil {
|
||||
return ""
|
||||
}
|
||||
return *s
|
||||
}
|
||||
|
||||
func Int32ptr(i *int) *int32 {
|
||||
if i == nil {
|
||||
return nil
|
||||
}
|
||||
return ptr.To(int32(*i))
|
||||
}
|
Reference in New Issue
Block a user