From 68bd53a12f880be34f157fb1e139b8bb757b7911 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Apr 2025 13:04:51 +0000 Subject: [PATCH 1/2] Bump the github-actions group with 2 updates Bumps the github-actions group with 2 updates: [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) and [robinraju/release-downloader](https://github.com/robinraju/release-downloader). Updates `golangci/golangci-lint-action` from 6.2.0 to 6.5.0 - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v6.2.0...v6.5.0) Updates `robinraju/release-downloader` from 1.11 to 1.12 - [Release notes](https://github.com/robinraju/release-downloader/releases) - [Commits](https://github.com/robinraju/release-downloader/compare/v1.11...v1.12) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: robinraju/release-downloader dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/lint.yaml | 2 +- .github/workflows/publish.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index fc55977..a890a07 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -31,6 +31,6 @@ jobs: with: go-version: "~1.22" - name: golangci-lint - uses: golangci/golangci-lint-action@v6.2.0 + uses: golangci/golangci-lint-action@v7.0.0 with: version: v1.58.0 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 692e728..839a122 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: robinraju/release-downloader@v1.11 + - uses: robinraju/release-downloader@v1.12 with: repository: "coder/code-marketplace" tag: ${{ github.event.inputs.version || github.ref_name }} From 02a3433f583d353ff6d7fa133e84a3732da64e5f Mon Sep 17 00:00:00 2001 From: Asher Date: Fri, 9 May 2025 11:47:39 -0800 Subject: [PATCH 2/2] Update go and golangci-lint --- .github/workflows/lint.yaml | 4 ++-- .golangci.yaml | 4 ++++ api/api_test.go | 7 ++++--- flake.lock | 35 ++++++++++++++++++++++++++--------- flake.nix | 2 +- 5 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 .golangci.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a890a07..551f9d0 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -29,8 +29,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "~1.22" + go-version: 1.24.2 - name: golangci-lint uses: golangci/golangci-lint-action@v7.0.0 with: - version: v1.58.0 + version: v2.1.2 diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..387c5e4 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,4 @@ +version: "2" +linters: + disable: + - errcheck diff --git a/api/api_test.go b/api/api_test.go index ab7ff40..86bd1ab 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -305,7 +305,8 @@ func TestAPI(t *testing.T) { var resp *http.Response var err error - if method == http.MethodPost { + switch method { + case http.MethodPost: var body []byte if str, ok := c.Request.(string); ok { body = []byte(str) @@ -314,9 +315,9 @@ func TestAPI(t *testing.T) { require.NoError(t, err) } resp, err = client.Post(url, "application/json", bytes.NewReader(body)) - } else if method == http.MethodGet { + case http.MethodGet: resp, err = client.Get(url) - } else { + default: t.Fatal(method + " is not handled in the test yet, please add it now") } require.NoError(t, err) diff --git a/flake.lock b/flake.lock index d6c2c5a..9f3817b 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,15 @@ { "nodes": { "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -17,12 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1661353537, - "narHash": "sha256-1E2IGPajOsrkR49mM5h55OtYnU0dGyre6gl60NXKITE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0e304ff0d9db453a4b230e9386418fd974d5804a", - "type": "github" + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", + "path": "/nix/store/isfbldda5j8j6x3nbv1zim0c0dpf90v8-source", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", + "type": "path" }, "original": { "id": "nixpkgs", @@ -34,6 +36,21 @@ "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index fdc309b..be8e3d2 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ in { devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ - go_1_19 + go_1_24 golangci-lint gotestsum kubernetes-helm