Skip to content

Enable modernize linter and apply suggestions #905

Enable modernize linter and apply suggestions

Enable modernize linter and apply suggestions #905

Workflow file for this run

name: golangci-lint
on:
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
golangci:
strategy:
matrix:
include:
- GOOS: windows
runner: ubuntu-latest
- GOOS: linux
runner: ubuntu-latest
- GOOS: darwin
runner: macos-latest
name: lint-${{ matrix.GOOS }}
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Read .go-version file
id: goversion
run: echo "::set-output name=version::$(cat .go-version)"
- uses: actions/setup-go@v4
with:
go-version: "${{ steps.goversion.outputs.version }}"
- name: golangci-lint
env:
GOOS: ${{ matrix.GOOS }}
CGO_ENABLED: ${{ matrix.GOOS == 'darwin' && '1' || '' }}
uses: golangci/golangci-lint-action@v7
with:
version: v2.10.1
args: --timeout=30m