summaryrefslogtreecommitdiffstats
path: root/pkg/integration/components/shell.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/integration/components/shell.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/integration/components/shell.go')
-rw-r--r--pkg/integration/components/shell.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/integration/components/shell.go b/pkg/integration/components/shell.go
index 60c627918..e3df61a50 100644
--- a/pkg/integration/components/shell.go
+++ b/pkg/integration/components/shell.go
@@ -9,8 +9,6 @@ import (
"path/filepath"
"runtime"
"time"
-
- "github.com/jesseduffield/lazygit/pkg/utils"
)
// this is for running shell commands, mostly for the sake of setting up the repo
@@ -289,7 +287,7 @@ func (self *Shell) CreateRepoHistory() *Shell {
// Choose a random commit within the last 20 commits on the master branch
lastMasterCommit := totalCommits - 1
- commitOffset := rand.Intn(utils.Min(lastMasterCommit, 5)) + 1
+ commitOffset := rand.Intn(min(lastMasterCommit, 5)) + 1
// Create the feature branch and checkout the chosen commit
self.NewBranchFrom(branchName, fmt.Sprintf("master~%d", commitOffset))