chore(go): modernize syntax (#2672)

* modernize go syntax

* fix lint
This commit is contained in:
Jo
2025-09-18 18:05:58 +02:00
committed by GitHub
parent 122c221d02
commit 81440e54a4
30 changed files with 39 additions and 100 deletions

View File

@@ -10,6 +10,7 @@ import (
"os"
"os/exec"
"path/filepath"
"slices"
"strings"
"sync"
"testing"
@@ -508,10 +509,8 @@ func TestIntegrationLocalInstallGenerateSRCINFO(t *testing.T) {
}
captureOverride := func(cmd *exec.Cmd) (stdout string, stderr string, err error) {
for _, arg := range cmd.Args {
if arg == "--printsrcinfo" {
return string(srcinfo), "", nil
}
if slices.Contains(cmd.Args, "--printsrcinfo") {
return string(srcinfo), "", nil
}
return strings.Join(tars, "\n"), "", nil
}