diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9d4aae5a..75dac170 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,9 +16,6 @@ defaults: run: shell: bash -env: - GOLANGCI_TIMEOUT: 10m0s - jobs: lint: @@ -27,7 +24,12 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 - - name: Lint Code - uses: golangci/golangci-lint-action@v2 + - name: Output Variables + id: vars + run: echo "::set-output name=go_version::$(grep "go 1." go.mod | cut -d " " -f 2)" + - name: Setup Golang Environment + uses: actions/setup-go@v2 with: - args: --timeout ${{ env.GOLANGCI_TIMEOUT }} + go-version: ${{ steps.vars.outputs.go_version }} + - name: Lint Code + uses: golangci/golangci-lint-action@v3 diff --git a/.golangci.yml b/.golangci.yml index 19af8915..a29ee394 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -60,3 +60,5 @@ linters: issues: max-issues-per-linter: 0 max-same-issues: 0 +run: + timeout: 5m diff --git a/client/nginx.go b/client/nginx.go index faa50d5e..025db45a 100644 --- a/client/nginx.go +++ b/client/nginx.go @@ -1052,7 +1052,7 @@ func (client *NginxClient) GetStats() (*Stats, error) { requests, err := client.GetHTTPRequests() if err != nil { - return nil, fmt.Errorf("Failed to get stats: %w", err) + return nil, fmt.Errorf("failed to get stats: %w", err) } ssl, err := client.GetSSL()