1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-09 09:22:48 +03:00

Fix deprecated rand.Seed

This commit is contained in:
Stefan Haller
2023-03-17 19:29:43 +01:00
parent cef804f27a
commit 549ce09f71
2 changed files with 7 additions and 7 deletions

View File

@@ -191,7 +191,7 @@ func (gui *Gui) getRandomTip() string {
),
}
rand.Seed(time.Now().UnixNano())
randomIndex := rand.Intn(len(tips))
rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
randomIndex := rnd.Intn(len(tips))
return tips[randomIndex]
}