From b4beea911cfaf564109e725edadf06e6dcabfba5 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Tue, 27 Aug 2024 22:19:28 +0200 Subject: [PATCH] bump Golang to 1.23 --- .github/workflows/dialects.yml | 2 +- .github/workflows/lint.yml | 6 +++--- .github/workflows/test.yml | 4 ++-- Makefile | 4 ++-- README.md | 2 +- go.mod | 2 +- go.sum | 3 +++ pkg/frame/reader.go | 4 ++-- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dialects.yml b/.github/workflows/dialects.yml index 9cdd6b473..57c18e3eb 100644 --- a/.github/workflows/dialects.yml +++ b/.github/workflows/dialects.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: "1.22" + go-version: "1.23" - run: go install mvdan.cc/gofumpt@v0.5.0 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 90586bbc3..4db857cfb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,11 +15,11 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: "1.22" + go-version: "1.23" - uses: golangci/golangci-lint-action@v3 with: - version: v1.59.1 + version: v1.61.0 go-mod-tidy: runs-on: ubuntu-22.04 @@ -29,7 +29,7 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: "1.22" + go-version: "1.23" - run: | go mod tidy diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7590f77cc..1b708f95c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - go: ["1.20", "1.21", "1.22"] + go: ["1.21", "1.22", "1.23"] steps: - uses: actions/checkout@v4 @@ -22,7 +22,7 @@ jobs: - run: make test-nodocker - - if: matrix.go == '1.22' + - if: matrix.go == '1.23' uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Makefile b/Makefile index 58669b522..e4898dcff 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -BASE_IMAGE = golang:1.22-alpine3.18 -LINT_IMAGE = golangci/golangci-lint:v1.59.1 +BASE_IMAGE = golang:1.23-alpine3.20 +LINT_IMAGE = golangci/golangci-lint:v1.61.0 .PHONY: $(shell ls) diff --git a/README.md b/README.md index 9beac8675..c86770290 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Features: ## Installation -1. Install Go ≥ 1.20. +1. Install Go ≥ 1.21. 2. Create an empty folder, open a terminal in it and initialize the Go modules system: diff --git a/go.mod b/go.mod index fe5a0ab8a..17d630a14 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/bluenviron/gomavlib/v3 -go 1.20 +go 1.21 require ( bou.ke/monkey v1.0.2 diff --git a/go.sum b/go.sum index 8d247651c..ba452de50 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,16 @@ bou.ke/monkey v1.0.2 h1:kWcnsrCNUatbxncxR/ThdYqbytgOIArtYWqcQLQzKLI= bou.ke/monkey v1.0.2/go.mod h1:OqickVX3tNx6t33n1xvtTtu85YN5s6cKwVug+oHMaIA= github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY= +github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/kong v1.2.1 h1:E8jH4Tsgv6wCRX2nGrdPyHDUCSG83WH2qE4XLACD33Q= github.com/alecthomas/kong v1.2.1/go.mod h1:rKTSFhbdp3Ryefn8x5MOEprnRFQ7nlmMC01GKhehhBM= github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= github.com/pion/transport/v2 v2.2.10 h1:ucLBLE8nuxiHfvkFKnkDQRYWYfp8ejf4YBOPfaQpw6Q= diff --git a/pkg/frame/reader.go b/pkg/frame/reader.go index 213fd18f2..30a2b8570 100644 --- a/pkg/frame/reader.go +++ b/pkg/frame/reader.go @@ -90,7 +90,7 @@ func (r *Reader) Read() (Frame, error) { err = f.decode(r.br) if err != nil { - return nil, newError(err.Error()) + return nil, newError("%s", err.Error()) } if r.conf.InKey != nil { @@ -126,7 +126,7 @@ func (r *Reader) Read() (Frame, error) { _, isV2 := f.(*V2Frame) msg, err := mp.Read(f.GetMessage().(*message.MessageRaw), isV2) if err != nil { - return nil, newError(fmt.Sprintf("unable to decode message: %s", err.Error())) + return nil, newError("unable to decode message: %s", err.Error()) } switch ff := f.(type) {