Revert "cherry pick only IfZero from (#29755)"

This reverts commit 82851f429a.
This commit is contained in:
Shiny Nematoda 2024-03-28 11:46:41 +00:00
parent 1684f0e5bf
commit a38260aed9

View file

@ -212,12 +212,3 @@ func ToFloat64(number any) (float64, error) {
func ToPointer[T any](val T) *T { func ToPointer[T any](val T) *T {
return &val 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
}