mirror of
https://github.com/davegallant/vpngate.git
synced 2025-11-25 19:04:17 +00:00
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:
@@ -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" {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user