Skip to content

Commit

Permalink
Testing of Go 1.22 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonboom authored Apr 21, 2024
1 parent 1bfde95 commit 28a15a7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
branches: [ master ]

env:
GO_VERSION: ^1.20
GOLANGCI_LINT_VERSION: v1.56.2
GO_VERSION: ^1.22
GOLANGCI_LINT_VERSION: v1.57.2

permissions:
contents: read
Expand Down
7 changes: 5 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module github.com/Antonboom/nilnil

go 1.20

require golang.org/x/tools v0.19.0
require golang.org/x/tools v0.20.0

require golang.org/x/mod v0.16.0 // indirect
require (
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sync v0.7.0 // indirect
)
11 changes: 6 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=
golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg=
19 changes: 19 additions & 0 deletions pkg/analyzer/testdata/src/examples/issue29.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package examples

type data struct {
a int
b int
}

func nilnil(a, b int) (*data, error) {
if a == 0 && b == 0 {
return nil, nil // want "return both the `nil` error and invalid value: use a sentinel error instead"
}
return &data{a: a, b: b}, nil
}

func main() {
const a = 0
const b = 0
_, _ = nilnil(a, b)
}

0 comments on commit 28a15a7

Please sign in to comment.