diff --git a/modules/util/util.go b/modules/util/util.go index c94fb9104..5c7515819 100644 --- a/modules/util/util.go +++ b/modules/util/util.go @@ -212,12 +212,3 @@ func ToFloat64(number any) (float64, error) { func ToPointer[T any](val T) *T { return &val } - -// IfZero returns "def" if "v" is a zero value, otherwise "v" -func IfZero[T comparable](v, def T) T { - var zero T - if v == zero { - return def - } - return v -}