We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
builtin
FirstNonEmpty()
cmp.Or()
1 parent dbe1ad0 commit c43746eCopy full SHA for c43746e
1 file changed
builtin/builtin.go
@@ -55,6 +55,7 @@ func ErrorIfUnset(isUnset bool, fieldName string) error {
55
}
56
57
// returns the first non-empty value.
58
+// Deprecated: use `cmp.Or()`
59
func FirstNonEmpty[T comparable](values ...T) T {
60
var empty T
61
for _, value := range values {
0 commit comments