mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-23 00:39:13 +02:00
Remove redundant variable dedeclarations
In go 1.22, loop variables are redeclared with each iteration of the loop, rather than simple updated on each iteration. This means that we no longer need to manually redeclare variables when they're closed over by a function.
This commit is contained in:
pkg
commands
git_commands
branch_test.gocommit_loader.gocommit_loader_test.gocommit_test.gofile_loader_test.goflow_test.gorebase_test.goreflog_commit_loader_test.gorepo_paths_test.gostash_loader_test.gostash_test.gosync_test.gotag_loader_test.goworking_tree_test.goworktree_loader.goworktree_loader_test.go
git_config
hosting_service
oscommands
patch
gui
context
controllers
filetree
mergeconflicts
patch_exploring
presentation
services
custom_commands
style
integration
components
utils
@ -86,7 +86,6 @@ func TestSyncPush(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, s := range scenarios {
|
||||
s := s
|
||||
t.Run(s.testName, func(t *testing.T) {
|
||||
instance := buildSyncCommands(commonDeps{})
|
||||
task := gocui.NewFakeTask()
|
||||
@ -124,7 +123,6 @@ func TestSyncFetch(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, s := range scenarios {
|
||||
s := s
|
||||
t.Run(s.testName, func(t *testing.T) {
|
||||
instance := buildSyncCommands(commonDeps{})
|
||||
instance.UserConfig.Git.FetchAll = s.fetchAllConfig
|
||||
@ -163,7 +161,6 @@ func TestSyncFetchBackground(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, s := range scenarios {
|
||||
s := s
|
||||
t.Run(s.testName, func(t *testing.T) {
|
||||
instance := buildSyncCommands(commonDeps{})
|
||||
instance.UserConfig.Git.FetchAll = s.fetchAllConfig
|
||||
|
Reference in New Issue
Block a user