Update golangci/golangci-lint-action action to v9 (#161)

* Update golangci/golangci-lint-action action to v9

* Bump golangci-lint to 2.6.2

* Refactor to pass golangcli-lint

* Fix tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dave Gallant <dave.gallant@gmail.com>
Co-authored-by: Dave Gallant <davegallant@proton.me>
This commit is contained in:
renovate[bot]
2025-11-23 09:13:17 -05:00
committed by GitHub
parent 903f93895a
commit fb9c4800ae
9 changed files with 1128 additions and 30 deletions

View File

@@ -20,7 +20,7 @@ func Run(path string, workDir string, args ...string) error {
}
cmd := exec.Command(path, args...)
cmd.Dir = workDir
log.Debug().Msgf("Executing " + strings.Join(cmd.Args, " "))
log.Debug().Msg("Executing " + strings.Join(cmd.Args, " "))
stdout, err := cmd.StdoutPipe()
if err != nil {
log.Fatal().Msgf("Failed to get stdout pipe: %v", err)

View File

@@ -14,7 +14,9 @@ func Connect(configPath string) error {
if err != nil {
return errors.Annotate(err, "Unable to create a temporary log file")
}
defer os.Remove(tmpLogFile.Name())
defer func() {
_ = os.Remove(tmpLogFile.Name())
}()
executable := "openvpn"
if runtime.GOOS == "windows" {

View File

@@ -119,7 +119,9 @@ func GetList(httpProxy string, socks5Proxy string) (*[]Server, error) {
if err != nil {
return err
}
defer r.Body.Close()
defer func() {
_ = r.Body.Close()
}()
if r.StatusCode != 200 {
return errors.Annotatef(err, "Unexpected status code when retrieving vpn list: %d", r.StatusCode)