From 84e5594726eccbc1616ca8e6d5db53ffd70d627d Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Fri, 30 Jun 2023 20:46:26 +1100 Subject: [PATCH] Update Go Signed-off-by: Nikita Skrynnik --- .github/workflows/ci.yaml | 2 -- .golangci.yml | 18 ++++++------------ Dockerfile | 2 +- go.mod | 2 +- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5e37452..4e9010b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,8 +17,6 @@ jobs: golangci-lint: uses: networkservicemesh/.github/.github/workflows/golangci-lint.yaml@main - with: - linter-version: v1.51.1 excludeFmtErrorf: uses: networkservicemesh/.github/.github/workflows/exclude-fmt-errorf.yaml@main diff --git a/.golangci.yml b/.golangci.yml index 08c52d0..240f77c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,7 @@ --- run: # concurrency: 6 - go: "1.19" + go: "1.20" timeout: 2m issues-exit-code: 1 tests: true @@ -42,13 +42,11 @@ linters-settings: min-len: 2 min-occurrences: 2 depguard: - list-type: blacklist - include-go-root: false - packages: - - errors - packages-with-error-message: - # specify an error message to output when a blacklisted package is used - - errors: "Please use \"github.com/pkg/errors\" instead of \"errors\" in go imports" + rules: + main: + deny: + - pkg: errors + desc: Please use github.com/pkg/errors instead of errors in go imports misspell: locale: US unparam: @@ -110,7 +108,6 @@ linters-settings: - regexpPattern - singleCaseSwitch - sloppyLen - # - sloppyReassign - stringXbytes - switchTrue - typeAssertChain @@ -129,7 +126,6 @@ linters-settings: linters: disable-all: true enable: - # - rowserrcheck - goheader - bodyclose - deadcode @@ -149,7 +145,6 @@ linters: - gosimple - govet - ineffassign - # - lll - misspell - nakedret - exportloopref @@ -159,7 +154,6 @@ linters: - typecheck - unconvert - unparam - # - unused - varcheck - whitespace issues: diff --git a/Dockerfile b/Dockerfile index 358bc40..1b9e6e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG VPP_VERSION=v23.02-rc0-189-g766031bdb FROM ghcr.io/networkservicemesh/govpp/vpp:${VPP_VERSION} as go -COPY --from=golang:1.18.2-buster /usr/local/go/ /go +COPY --from=golang:1.20.5-buster /usr/local/go/ /go ENV PATH ${PATH}:/go/bin ENV GO111MODULE=on ENV CGO_ENABLED=0 diff --git a/go.mod b/go.mod index 456ac19..7124eb4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/networkservicemesh/cmd-nsc-vpp -go 1.18 +go 1.20 require ( github.com/antonfisher/nested-logrus-formatter v1.3.1