CI/build: Update Go version, linters and fix minor issues (#1612)

* CI/build: Update Go version, linters and fix minor issues

* linters: Add intrange, copyloopvar, additional go vet linters to match gopls and fix issues
This commit is contained in:
Adrian Gallagher
2024-08-16 17:41:11 +10:00
committed by GitHub
parent facf291069
commit 225429bda6
111 changed files with 239 additions and 379 deletions

View File

@@ -35,7 +35,6 @@ func TestNewManager(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
got, err := NewManager(tt.args.config)
@@ -108,7 +107,6 @@ func TestGctScriptManagerGetMaxVirtualMachines(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
g := &GctScriptManager{
config: tt.fields.config,

View File

@@ -569,12 +569,12 @@ func TestVMCount(t *testing.T) {
}
}
func configHelper(enabled, imports bool, max uint8) *Config {
func configHelper(enabled, imports bool, maxVMs uint8) *Config {
return &Config{
Enabled: enabled,
AllowImports: imports,
ScriptTimeout: testVirtualMachineTimeout,
MaxVirtualMachines: max,
MaxVirtualMachines: maxVMs,
Verbose: true,
}
}