Skip to content

Commit

Permalink
Update golang.org/x/tools (#157)
Browse files Browse the repository at this point in the history
* Update golang.org/x/tools

* Update go versions for CI

* Update golangci-lint

* Go mod tidy

* Fix linting issues

* Update goreleaser
  • Loading branch information
breml authored Sep 12, 2024
1 parent 9e57a4d commit 51359a4
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
name: ci
runs-on: ubuntu-latest
env:
GO_VERSION: "1.20"
GOLANGCI_LINT_VERSION: v1.52.2
GO_VERSION: "stable"
GOLANGCI_LINT_VERSION: v1.61.0
CGO_ENABLED: 0

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "stable"
- uses: actions/go-dependency-submission@v1
with:
go-mod-path: go.mod
2 changes: 1 addition & 1 deletion .github/workflows/go-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

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

steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: "stable"

-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 5 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
version: 2

# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
Expand All @@ -23,9 +26,9 @@ archives:
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end -}}
snapshot:
name_template: "{{ .Tag }}-next"
version_template: "{{ .Tag }}-next"
changelog:
skip: true
disable: true
release:
github:
owner: mna
Expand Down
8 changes: 4 additions & 4 deletions bootstrap/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ func (s *Scanner) scanEscape(quote rune) bool {
msg := "unknown escape sequence"
if s.cur == -1 || s.cur == '\n' {
msg = "escape sequence not terminated"
s.errorf(msg)
s.errorf("%s", msg)
} else {
s.errorf(msg)
s.errorf("%s", msg)
s.read()
}
return false
Expand Down Expand Up @@ -268,10 +268,10 @@ func (s *Scanner) scanEscape(quote rune) bool {
msg := fmt.Sprintf("illegal character %#U in escape sequence", s.cur)
if s.cur == -1 || s.cur == '\n' {
msg = "escape sequence not terminated"
s.errorf(msg)
s.errorf("%s", msg)
return false
}
s.errorf(msg)
s.errorf("%s", msg)
s.read()
return false
}
Expand Down
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
module github.com/mna/pigeon

go 1.20
go 1.22.0

require golang.org/x/tools v0.24.0
toolchain go1.22.6

require golang.org/x/tools v0.25.0

require (
golang.org/x/mod v0.20.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE=
golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg=
3 changes: 1 addition & 2 deletions test/state/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ var cases = map[string]int{
func TestState(t *testing.T) {
for tc, exp := range cases {
got, err := Parse("", []byte(tc), Memoize(false), InitState("countCs", 10))

if err != nil {
t.Errorf(err.Error())
t.Errorf("%s", err.Error())
}
if got != exp {
t.Errorf("%q: want %v, got %v", tc, exp, got)
Expand Down
3 changes: 1 addition & 2 deletions test/stateclone/stateclone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ func TestState(t *testing.T) {
vals := make(values, 1)
vals[0] = 10
got, err := Parse("", []byte(tc), Memoize(false), InitState("vals", vals))

if err != nil {
t.Errorf(err.Error())
t.Errorf("%s", err.Error())
}
vals = got.(values)
res := 0
Expand Down
3 changes: 1 addition & 2 deletions test/statereadonly/statereadonly_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ var cases = map[string]int{
func TestStateReadonly(t *testing.T) {
for tc, exp := range cases {
got, err := Parse("", []byte(tc), Memoize(false))

if err != nil {
t.Errorf(err.Error())
t.Errorf("%s", err.Error())
}
if got != exp {
t.Errorf("%q: want %v, got %v", tc, exp, got)
Expand Down

0 comments on commit 51359a4

Please sign in to comment.