Skip to content

Commit

Permalink
Merge pull request #31 from breml/update-github-actions
Browse files Browse the repository at this point in the history
Update GitHub actions
  • Loading branch information
breml committed Aug 26, 2023
2 parents 583b427 + aa51e63 commit b94114b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ jobs:
name: ci
runs-on: ubuntu-latest
env:
GO_VERSION: "1.19"
GOLANGCI_LINT_VERSION: v1.45.2
GO_VERSION: "1.20"
GOLANGCI_LINT_VERSION: v1.52.2
CGO_ENABLED: 0

steps:

- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache Go modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/go-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:

strategy:
matrix:
go-version: [ "1.19", "1.20", "1.x" ]
go-version: [ "1.20", "1.21", "1.x" ]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cache Go modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
# In order:
# * Module download cache
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

-
name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: "1.19"
go-version: "1.20"

-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
Expand Down
20 changes: 10 additions & 10 deletions errchkjson.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ func (e *errchkjson) inspectArgs(pass *analysis.Pass, args []ast.Expr) {
}

// Construct *types.Interface for interface encoding.TextMarshaler
// type TextMarshaler interface {
// MarshalText() (text []byte, err error)
// }
//
// type TextMarshaler interface {
// MarshalText() (text []byte, err error)
// }
func textMarshalerInterface() *types.Interface {
textMarshalerInterface := types.NewInterfaceType([]*types.Func{
types.NewFunc(token.NoPos, nil, "MarshalText", types.NewSignature(
nil, nil, types.NewTuple(
types.NewFunc(token.NoPos, nil, "MarshalText", types.NewSignatureType(
nil, nil, nil, nil, types.NewTuple(
types.NewVar(token.NoPos, nil, "text",
types.NewSlice(
types.Universe.Lookup("byte").Type())),
Expand All @@ -328,14 +328,14 @@ func textMarshalerInterface() *types.Interface {
}

// Construct *types.Interface for interface json.Marshaler
// type Marshaler interface {
// MarshalJSON() ([]byte, error)
// }
//
// type Marshaler interface {
// MarshalJSON() ([]byte, error)
// }
func jsonMarshalerInterface() *types.Interface {
textMarshalerInterface := types.NewInterfaceType([]*types.Func{
types.NewFunc(token.NoPos, nil, "MarshalJSON", types.NewSignature(
nil, nil, types.NewTuple(
types.NewFunc(token.NoPos, nil, "MarshalJSON", types.NewSignatureType(
nil, nil, nil, nil, types.NewTuple(
types.NewVar(token.NoPos, nil, "",
types.NewSlice(
types.Universe.Lookup("byte").Type())),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/breml/errchkjson

go 1.19
go 1.20

require golang.org/x/tools v0.12.0

Expand Down

0 comments on commit b94114b

Please sign in to comment.