From 78840f1b48fe7ee0ca71524b39bd8f686022c3ae Mon Sep 17 00:00:00 2001 From: Xavier Michelon Date: Mon, 2 Dec 2024 11:24:08 +0100 Subject: [PATCH] chore: CI and linter update Update GitHub actions to latest versions. Update golangci-lint to latest version + fix reported issue. --- .github/actions/govulncheck/action.yml | 2 +- .github/workflows/check.yml | 14 +++++++------- contact_types.go | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/govulncheck/action.yml b/.github/actions/govulncheck/action.yml index f7555e0..43c424b 100644 --- a/.github/actions/govulncheck/action.yml +++ b/.github/actions/govulncheck/action.yml @@ -11,7 +11,7 @@ inputs: runs: using: "composite" steps: - - uses: actions/setup-go@v5.0.0 + - uses: actions/setup-go@v5 with: go-version: ${{ inputs.go-version-input }} check-latest: false diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index cbca24c..3d0fa83 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -9,15 +9,15 @@ jobs: - name: Get sources uses: actions/checkout@v4 - - name: Set up Go 1.21 - uses: actions/setup-go@v3 + - name: Set up Go 1.23.3 + uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.23.3' - - name: Run golsangci-lint - uses: golangci/golangci-lint-action@v3 + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 with: - version: v1.57.2 + version: v1.62.0 args: --timeout=180s skip-cache: true @@ -30,6 +30,6 @@ jobs: - name: Run govulncheck uses: ./.github/actions/govulncheck with: - go-version-input: 1.21 + go-version-input: 1.23.3 go-package: ./... \ No newline at end of file diff --git a/contact_types.go b/contact_types.go index 446e3bc..c9ccd6a 100644 --- a/contact_types.go +++ b/contact_types.go @@ -263,7 +263,7 @@ func (c *Contact) SetSettings(kr *crypto.KeyRing, email string, cardType CardTyp } // KEY - if settings.Keys != nil && len(settings.Keys) > 0 { + if len(settings.Keys) > 0 { var keys = "" for i, key := range settings.Keys { if i > 0 {