mirror of https://github.com/kubernetes/kops.git
Merge pull request #454 from justinsb/more_value_type_helpers
Add more value helpers
This commit is contained in:
commit
3e673c71bc
|
@ -43,6 +43,20 @@ func Int64(v int64) *int64 {
|
|||
return &v
|
||||
}
|
||||
|
||||
func Int64Value(v *int64) int64 {
|
||||
if v == nil {
|
||||
return 0
|
||||
}
|
||||
return *v
|
||||
}
|
||||
|
||||
func Uint64Value(v *uint64) uint64 {
|
||||
if v == nil {
|
||||
return 0
|
||||
}
|
||||
return *v
|
||||
}
|
||||
|
||||
func DebugPrint(o interface{}) string {
|
||||
if o == nil {
|
||||
return "<nil>"
|
||||
|
|
Loading…
Reference in New Issue