From e5462e3f6999aa945737dccd9ec23b1cb0d1d952 Mon Sep 17 00:00:00 2001 From: bluenviron-bot <214245907+bluenviron-bot@users.noreply.github.com> Date: Mon, 24 Aug 2026 04:02:32 +0000 Subject: [PATCH 1/2] bump Golang to 1.27 --- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- Makefile | 2 +- README.md | 2 +- go.mod | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c5efb33e2..98b225831 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-go@v7 with: - go-version: "1.26" + go-version: "1.27" - uses: golangci/golangci-lint-action@v9 with: @@ -32,7 +32,7 @@ jobs: - uses: actions/setup-go@v7 with: - go-version: "1.26" + go-version: "1.27" - run: | go mod tidy -diff diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe7acc60a..0a8e466e4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - go: ["1.25", "1.26"] + go: ["1.26", "1.27"] steps: - uses: actions/checkout@v7 @@ -25,7 +25,7 @@ jobs: - run: make test-nodocker - - if: matrix.go == '1.26' + - if: matrix.go == '1.27' uses: codecov/codecov-action@v7 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Makefile b/Makefile index 86e2985be..f691fb406 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -BASE_IMAGE = golang:1.26-alpine3.24 +BASE_IMAGE = golang:1.27-alpine3.24 LINT_IMAGE = golangci/golangci-lint:v2.13.1 .PHONY: $(shell ls) diff --git a/README.md b/README.md index 408e86525..f2e704708 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Features: ## Installation -1. Install Go ≥ 1.25. +1. Install Go ≥ 1.26. 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 c13b00fb9..455ebfde0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/bluenviron/gomavlib/v4 -go 1.25.0 +go 1.26.0 require ( github.com/alecthomas/kong v1.16.1 From bb8e2ff7336e0f64447e461e8fd6873ae7d7032c Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:31:32 +0200 Subject: [PATCH 2/2] additional changes --- channel.go | 3 +-- pkg/frame/reader.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/channel.go b/channel.go index 7de808a4f..bb457c7db 100644 --- a/channel.go +++ b/channel.go @@ -226,8 +226,7 @@ func (ch *Channel) runReader() error { var err error fr, err = ch.frameReadWriter.Read() if err != nil { - var eerr frame.ReadError - if errors.As(err, &eerr) { + if _, ok := errors.AsType[frame.ReadError](err); ok { ch.node.pushEvent(&EventParseError{err, ch}) continue } diff --git a/pkg/frame/reader.go b/pkg/frame/reader.go index 2d1305135..266936dd1 100644 --- a/pkg/frame/reader.go +++ b/pkg/frame/reader.go @@ -17,8 +17,8 @@ const ( func hasStringFields(msg message.Message) bool { typ := reflect.TypeOf(msg).Elem() - for i := range typ.NumField() { - if typ.Field(i).Type == reflect.TypeFor[string]() { + for field := range typ.Fields() { + if field.Type == reflect.TypeFor[string]() { return true } }