Skip to content

Commit b94114b

Browse files
authored
Merge pull request #31 from breml/update-github-actions
Update GitHub actions
2 parents 583b427 + aa51e63 commit b94114b

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ jobs:
1313
name: ci
1414
runs-on: ubuntu-latest
1515
env:
16-
GO_VERSION: "1.19"
17-
GOLANGCI_LINT_VERSION: v1.45.2
16+
GO_VERSION: "1.20"
17+
GOLANGCI_LINT_VERSION: v1.52.2
1818
CGO_ENABLED: 0
1919

2020
steps:
2121

2222
- name: Set up Go ${{ env.GO_VERSION }}
23-
uses: actions/setup-go@v2
23+
uses: actions/setup-go@v4
2424
with:
2525
go-version: ${{ env.GO_VERSION }}
2626

2727
- name: Check out code
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v3
2929
with:
3030
fetch-depth: 0
3131

3232
- name: Cache Go modules
33-
uses: actions/cache@v2
33+
uses: actions/cache@v3
3434
with:
3535
path: ~/go/pkg/mod
3636
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}

.github/workflows/go-cross.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ jobs:
1717

1818
strategy:
1919
matrix:
20-
go-version: [ "1.19", "1.20", "1.x" ]
20+
go-version: [ "1.20", "1.21", "1.x" ]
2121
os: [ubuntu-latest, macos-latest, windows-latest]
2222

2323
steps:
2424
- name: Set up Go ${{ matrix.go-version }}
25-
uses: actions/setup-go@v2
25+
uses: actions/setup-go@v4
2626
with:
2727
go-version: ${{ matrix.go-version }}
2828

2929
- name: Checkout code
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v3
3131

3232
- name: Cache Go modules
33-
uses: actions/cache@v2
33+
uses: actions/cache@v3
3434
with:
3535
# In order:
3636
# * Module download cache

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ jobs:
1212
steps:
1313
-
1414
name: Checkout
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
1818

1919
-
2020
name: Set up Go
21-
uses: actions/setup-go@v2
21+
uses: actions/setup-go@v3
2222
with:
23-
go-version: "1.19"
23+
go-version: "1.20"
2424

2525
-
2626
name: Run GoReleaser
27-
uses: goreleaser/goreleaser-action@v2
27+
uses: goreleaser/goreleaser-action@v4
2828
with:
2929
distribution: goreleaser
3030
version: latest

errchkjson.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -308,14 +308,14 @@ func (e *errchkjson) inspectArgs(pass *analysis.Pass, args []ast.Expr) {
308308
}
309309

310310
// Construct *types.Interface for interface encoding.TextMarshaler
311-
// type TextMarshaler interface {
312-
// MarshalText() (text []byte, err error)
313-
// }
314311
//
312+
// type TextMarshaler interface {
313+
// MarshalText() (text []byte, err error)
314+
// }
315315
func textMarshalerInterface() *types.Interface {
316316
textMarshalerInterface := types.NewInterfaceType([]*types.Func{
317-
types.NewFunc(token.NoPos, nil, "MarshalText", types.NewSignature(
318-
nil, nil, types.NewTuple(
317+
types.NewFunc(token.NoPos, nil, "MarshalText", types.NewSignatureType(
318+
nil, nil, nil, nil, types.NewTuple(
319319
types.NewVar(token.NoPos, nil, "text",
320320
types.NewSlice(
321321
types.Universe.Lookup("byte").Type())),
@@ -328,14 +328,14 @@ func textMarshalerInterface() *types.Interface {
328328
}
329329

330330
// Construct *types.Interface for interface json.Marshaler
331-
// type Marshaler interface {
332-
// MarshalJSON() ([]byte, error)
333-
// }
334331
//
332+
// type Marshaler interface {
333+
// MarshalJSON() ([]byte, error)
334+
// }
335335
func jsonMarshalerInterface() *types.Interface {
336336
textMarshalerInterface := types.NewInterfaceType([]*types.Func{
337-
types.NewFunc(token.NoPos, nil, "MarshalJSON", types.NewSignature(
338-
nil, nil, types.NewTuple(
337+
types.NewFunc(token.NoPos, nil, "MarshalJSON", types.NewSignatureType(
338+
nil, nil, nil, nil, types.NewTuple(
339339
types.NewVar(token.NoPos, nil, "",
340340
types.NewSlice(
341341
types.Universe.Lookup("byte").Type())),

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/breml/errchkjson
22

3-
go 1.19
3+
go 1.20
44

55
require golang.org/x/tools v0.12.0
66

0 commit comments

Comments
 (0)