diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 77bf9c3..7945764 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.20 + - name: Set up Go 1.22 uses: actions/setup-go@v1 with: - go-version: 1.20 + go-version: 1.22 id: go - name: Check out code into the Go module directory diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 025a75d..1b8b896 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -45,7 +45,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: '1.20' + go-version: '1.22' - uses: actions/checkout@v3 - run: | go mod tidy @@ -60,7 +60,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: '1.20' + go-version: '1.22' - uses: actions/checkout@v3 - run: | dnf -y install make gcc glib2-devel glibc-static golang @@ -72,10 +72,10 @@ jobs: name: Unit test runs-on: ubuntu-latest steps: - - name: Set up Go 1.20 + - name: Set up Go 1.22 uses: actions/setup-go@v1 with: - go-version: 1.20 + go-version: 1.22 id: go - name: Check out code into the Go module directory diff --git a/.golangci.yml b/.golangci.yml index 4454787..d5c1c5c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,19 +7,11 @@ linters: - exhaustruct - tagliatelle # deprecated - - varcheck - - deadcode - - ifshort - - nosnakecase - - structcheck - rowserrcheck - - structcheck - wastedassign - - scopelint - - maligned - - interfacer - - exhaustivestruct - - golint + - execinquery + - exportloopref + - gomnd linters-settings: errcheck: check-blank: false diff --git a/Makefile b/Makefile index 74f9ec4..f469e18 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ install.tools: .install.pre-commit .install.codespell .install.golangci-lint .in .PHONY: .install.golangci-lint .install.golangci-lint: - VERSION=1.56.2 ./hack/install_golangci.sh + VERSION=1.61.0 ./hack/install_golangci.sh .PHONY: .install.sphinx-build .install.sphinx-build: diff --git a/connection.go b/connection.go index 23cd093..eae5ab1 100644 --- a/connection.go +++ b/connection.go @@ -50,7 +50,7 @@ func NewConnection(ctx context.Context, username string, password string) (conte } dialContext := func(ctx context.Context, _, _ string) (net.Conn, error) { //nolint:revive - return net.Dial("tcp", _url.Host) //nolint:wrapcheck + return net.Dial("tcp", _url.Host) } connection.client = &http.Client{ @@ -100,11 +100,11 @@ func (h *apiResponse) isInformational() bool { } func (h *apiResponse) isSuccess() bool { - return h.Response.StatusCode/100 == 2 //nolint:gomnd + return h.Response.StatusCode/100 == 2 //nolint:mnd } func (h *apiResponse) isRedirection() bool { - return h.Response.StatusCode/100 == 3 //nolint:gomnd + return h.Response.StatusCode/100 == 3 //nolint:mnd } // process drains the response body, and processes the HTTP status code