Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.github: Bump golangci/golangci-lint-action from 3 to 6 #52

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
# This step sets up the variable steps.golangci-lint-version.outputs.v
Expand All @@ -22,7 +22,6 @@ jobs:
GOLANGCI_LINT_VERSION=$( go list -m -f '{{.Version}}' github.com/golangci/golangci-lint )
echo "v=$GOLANGCI_LINT_VERSION" >> "$GITHUB_OUTPUT"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: ${{ steps.golangci-lint-version.outputs.v }}
skip-pkg-cache: true
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: build
name: test

on:
push:
branches: [ main ]
pull_request:

jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

Expand Down
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
run:
go: '1.18'

linters-settings:
gofmt:
simplify: false
Expand Down
4 changes: 2 additions & 2 deletions zendesk/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"strconv"
"time"
Expand Down Expand Up @@ -97,7 +97,7 @@ func (c *Cursor) FetchRecords(ctx context.Context) ([]sdk.Record, error) {
return nil, fmt.Errorf("non 200 status code received(%v)", resp.StatusCode)
}

ticketList, err := ioutil.ReadAll(resp.Body)
ticketList, err := io.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("error reading the response body: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions zendesk/cursor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"encoding/base64"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"net/url"
Expand Down Expand Up @@ -138,7 +138,7 @@ func (t *testHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
assert.Equal(t.t, t.url.Path, r.URL.Path)
assert.Equal(t.t, t.url.RawQuery, r.URL.RawQuery)

bodyBytes, err := ioutil.ReadAll(r.Body)
bodyBytes, err := io.ReadAll(r.Body)
assert.NoError(t.t, err)

if len(t.wantBody) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions zendesk/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"strconv"
"time"
Expand Down Expand Up @@ -109,7 +109,7 @@ func (b *BulkImporter) Write(ctx context.Context, records []sdk.Record) error {

if resp.StatusCode != http.StatusOK {
// no use checking the error, if it errors, we will just have empty body message in error
bodyBytes, _ := ioutil.ReadAll(resp.Body)
bodyBytes, _ := io.ReadAll(resp.Body)
return fmt.Errorf("non 200 status code(%d) received(%v)", resp.StatusCode, string(bodyBytes))
}

Expand Down
Loading