summaryrefslogtreecommitdiffstats
path: root/pkg/utils/utils.go
diff options
context:
space:
mode:
authorEng Zer Jun <engzerjun@gmail.com>2024-04-07 23:24:10 +0800
committerEng Zer Jun <engzerjun@gmail.com>2024-04-07 23:24:10 +0800
commitf933a2f7ec2e0ab280d41a7d1582729c1acab92b (patch)
tree5a71a868efe921c21302d854cdae2f1845c384f5 /pkg/utils/utils.go
parented61b9a7f2e2ca07643ded8e33a6d38e57f32b22 (diff)
Replace min/max helpers with built-in min/max
We upgraded our minimum Go version to 1.21 in commit 57ac9c2189458a7f0e63c2e9cac8334694a3d545. We can now replace our `utils.Min` and `utils.Max` functions with the built-in `min` and `max`. Reference: https://go.dev/ref/spec#Min_and_max Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Diffstat (limited to 'pkg/utils/utils.go')
-rw-r--r--pkg/utils/utils.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go
index 3c4bda95b..ceb8f0dac 100644
--- a/pkg/utils/utils.go
+++ b/pkg/utils/utils.go
@@ -32,21 +32,6 @@ func Loader(now time.Time, config config.SpinnerConfig) string {
return config.Frames[index]
}
-// Min returns the minimum of two integers
-func Min(x, y int) int {
- if x < y {
- return x
- }
- return y
-}
-
-func Max(x, y int) int {
- if x > y {
- return x
- }
- return y
-}
-
func SortRange(x int, y int) (int, int) {
if x < y {
return x, y