From dbecf142dd7a13ef1bbd07522d995b72167b822f Mon Sep 17 00:00:00 2001 From: Aurora Gaffney Date: Mon, 16 Sep 2024 07:53:27 -0500 Subject: [PATCH] chore: update to Go 1.22 (#122) The error log fix was required for the code to compile at all with Go 1.23 --- .github/workflows/go-test.yml | 2 +- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/publish.yml | 2 +- go.mod | 2 +- internal/node/node.go | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index c15523b..3673f70 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -13,7 +13,7 @@ jobs: name: go-test strategy: matrix: - go-version: [1.21.x, 1.22.x] + go-version: [1.22.x, 1.23.x] # TODO: re-enable macos-latest when the repo is public platform: [ubuntu-latest] #, macos-latest] runs-on: ${{ matrix.platform }} diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 136a976..5e0c06d 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.21.x + go-version: 1.22.x cache: false - name: golangci-lint uses: golangci/golangci-lint-action@v6 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9ad7226..29f38f5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -50,7 +50,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.21.x + go-version: 1.22.x - name: Build binary run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} make build - name: Upload release asset diff --git a/go.mod b/go.mod index f5624a6..832e794 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/blinklabs-io/node -go 1.21.5 +go 1.22 require ( github.com/blinklabs-io/gouroboros v0.93.3 diff --git a/internal/node/node.go b/internal/node/node.go index 0b060fa..e487dd0 100644 --- a/internal/node/node.go +++ b/internal/node/node.go @@ -15,6 +15,7 @@ package node import ( + "fmt" "log/slog" "net" @@ -66,7 +67,7 @@ func Run(logger *slog.Logger) error { } go func() { if err := n.StartMetrics(); err != nil { - logger.Error("failed to start metrics listener %v", err) + logger.Error(fmt.Sprintf("failed to start metrics listener %v", err)) } }() if err := n.Run(); err != nil {