Merge pull request #454 from justinsb/more_value_type_helpers

Add more value helpers
This commit is contained in:
Justin Santa Barbara 2016-09-17 15:02:57 -04:00 committed by GitHub
commit 3e673c71bc
1 changed files with 14 additions and 0 deletions

View File

@ -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>"