Skip to content

Commit

Permalink
Merge pull request #677 from noborus/remove-max-min
Browse files Browse the repository at this point in the history
Replaced custom max and min functions with standard library functions
  • Loading branch information
noborus authored Jan 3, 2025
2 parents 18a05c5 + 9714919 commit 99d5799
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions oviewer/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,8 @@ package oviewer
import (
"regexp"
"strings"

"golang.org/x/exp/constraints"
)

// max returns the larger value of the argument.
func max[T constraints.Ordered](a, b T) T {
if a > b {
return a
}
return b
}

// min returns the smaller value of the argument.
func min[T constraints.Ordered](a, b T) T {
if a < b {
return a
}
return b
}

// remove removes the value of the specified string from slice.
func remove[T comparable](list []T, s T) []T {
for n, l := range list {
Expand Down

0 comments on commit 99d5799

Please sign in to comment.