From ab02a2d71484e34e486bac26b6bbacbce5ddb52d Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Wed, 16 Mar 2022 12:12:26 +0100 Subject: [PATCH] feat: upgrade Go to 1.18 Signed-off-by: Mark Sagi-Kazar --- .github/workflows/ci.yaml | 2 +- .golangci.yml | 4 +++- Dockerfile | 2 +- flake.lock | 12 ++++++------ flake.nix | 2 +- go.mod | 2 +- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2cab1bd1..c0714ef1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -64,7 +64,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Checkout code uses: actions/checkout@v3 diff --git a/.golangci.yml b/.golangci.yml index ceadcb23..cfb64a75 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -45,13 +45,15 @@ linters: - structcheck - stylecheck - tparallel - - typecheck - unconvert - unparam - unused - varcheck - whitespace + # Disable temporarily until everything works with Go 1.18 + # - typecheck + # TODO: fix linter errors before enabling # - exhaustivestruct # - gochecknoglobals diff --git a/Dockerfile b/Dockerfile index e528c9b8..87c93b40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG BASE_IMAGE=alpine -FROM golang:1.17.8-alpine3.14 AS builder +FROM golang:1.18.0-alpine3.15 AS builder WORKDIR /usr/local/src/dex diff --git a/flake.lock b/flake.lock index 715570a3..f1a44670 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1634851050, - "narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=", + "lastModified": 1648297722, + "narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "c91f3de5adaf1de973b797ef7485e441a65b8935", + "rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade", "type": "github" }, "original": { @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1636800699, - "narHash": "sha256-SwbyVxXffu3G2ulJIbTf0iQfqhbGbdml4Dyv5j9BiAI=", + "lastModified": 1649225869, + "narHash": "sha256-u1zLtPmQzhT9mNXyM8Ey9pk7orDrIKdwooeGDEXm5xM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fa862644fc15ecb525eb8cd0a60276f1c340c7c", + "rev": "b6966d911da89e5a7301aaef8b4f0a44c77e103c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 8f444d5e..57aa2b05 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; - buildDeps = with pkgs; [ git go_1_17 gnumake ]; + buildDeps = with pkgs; [ git go_1_18 gnumake ]; devDeps = with pkgs; buildDeps ++ [ golangci-lint diff --git a/go.mod b/go.mod index d5723e52..ea7f3c13 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/dexidp/dex -go 1.17 +go 1.18 require ( entgo.io/ent v0.10.1