Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAbides committed Nov 20, 2023
1 parent 082038a commit a51f0da
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions internal/bindown/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,17 +316,3 @@ func MapKeys[M ~map[K]V, K comparable, V any](m M) []K {
}
return r
}

// DefaultValue returns the first argument that isn't zero
func DefaultValue[T comparable](val T, def ...T) T {
var zero T
if val != zero {
return val
}
for _, d := range def {
if d != zero {
return d
}
}
return zero
}

0 comments on commit a51f0da

Please sign in to comment.