Check for nil strings and include wrappers around each.

Signed-off-by: matt durham <mattdurham@ppog.org>
This commit is contained in:
matt durham
2023-11-14 10:34:31 -05:00
parent 5bb7e6086f
commit e3a7fab98a
11 changed files with 41 additions and 25 deletions

View File

@@ -12,3 +12,11 @@ func BoolToFloat(b bool) float64 {
}
return 0.0
}
func HasValue(v *string) bool {
return !IsEmpty(v)
}
func IsEmpty(v *string) bool {
return v == nil || *v == ""
}