diff options
author | Eng Zer Jun <engzerjun@gmail.com> | 2024-04-07 23:24:10 +0800 |
---|---|---|
committer | Eng Zer Jun <engzerjun@gmail.com> | 2024-04-07 23:24:10 +0800 |
commit | f933a2f7ec2e0ab280d41a7d1582729c1acab92b (patch) | |
tree | 5a71a868efe921c21302d854cdae2f1845c384f5 /pkg/utils/utils.go | |
parent | ed61b9a7f2e2ca07643ded8e33a6d38e57f32b22 (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.go | 15 |
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 |