Isn't gofmt ist part of the go command? Go ist the latest version: <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:8>Setup go version spec ^1.20 <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:9>Found in cache @ /opt/hostedtoolcache/go/1.20.3/x64 <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:10>Added go to the path <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:11>Successfully set up Go version ^1.20 <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:12>/opt/hostedtoolcache/go/1.20.3/x64/bin/go env GOMODCACHE <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:13>/opt/hostedtoolcache/go/1.20.3/x64/bin/go env GOCACHE <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:14>/home/runner/go/pkg/mod
<https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:15>/home/runner/.cache/go-build <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:16>Received 6992475 of 6992475 (100.0%), 10.2 MBs/sec <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:17>Cache Size: ~7 MB (6992475 B) <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:18>/usr/bin/tar -z -xf /home/runner/work/_temp/e939bf11-065d-4635-b10d-f083acd759cc/cache.tgz -P -C /home/runner/work/evcc/evcc <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:19>Cache restored successfully <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:20>Cache restored from key: setup-go-Linux-go-1.20.3-bb2ad7483b6059140940174a6d0146cd74cffa8dfe8f7aab3d2c995468e83809 <https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485#step:3:21>go version go1.20.3 linux/amd64 On Sunday, April 16, 2023 at 12:44:24 PM UTC+2 Axel Wagner wrote: > I can't tell what version of gofmt is used? It does not seem to be > manually installed, so I assume it is the one that comes with the image. Is > it possible that's too old? I don't know why that would matter here, > though, the code doesn't seem to be using any new language features. > > On Sun, Apr 16, 2023 at 12:34 PM Andreas Götz <andrea...@gmail.com> wrote: > >> The entire file is >> https://raw.githubusercontent.com/evcc-io/evcc/a5f7bb0100c4427a2f611f82b742f56a449681de/charger/keba-modbus_decorators.go, >> >> part of https://github.com/evcc-io/evcc/pull/7485. >> >> Seems entirely find to me and works locally which makes it so confusing. >> Also formats fine: https://go.dev/play/p/XhoSAFjpGXa >> >> On Sunday, April 16, 2023 at 12:31:22 PM UTC+2 Jan Mercl wrote: >> >>> On Sun, Apr 16, 2023 at 12:17 PM Andreas Götz <andrea...@gmail.com> >>> wrote: >>> > >>> > Good morning. Please excuse me for asking here- I'm stuck with >>> something that looks like a gofmt bug though that seems very unlikely. >>> > >>> > In CI ( >>> https://github.com/evcc-io/evcc/actions/runs/4712710735/jobs/8357929411?pr=7485) >>> >>> I'm using a "porcelain" step to make sure only go-fmt'ed sources are >>> checked in: >>> > >>> > gofmt -w -l $(find . -name '*.go') >>> > >>> > This step fails with: expected declaration, found ')' on this line >>> which seems lengthy but perfectly valid: >>> > >>> > func decorateKeba(base *Keba, meter func() (float64, error), >>> meterEnergy func() (float64, error), phaseCurrents func() (float64, >>> float64, float64, error), phaseVoltages func() (float64, float64, float64, >>> error), phaseSwitcher func(int) error) api.Charger { >>> > ... >>> > } >>> > >>> > Funny enough, the error happens on CI only. I've recently noticed that >>> Go issues had identified and fixed a mis-compile error and I'm wondering if >>> that (or similar) might be hitting here due to wrong binary code? >>> > >>> > Any thoughts? >>> >>> It's not enough to show the place of error, the preceding context may >>> cause it. Can you provide the whole file? Your snippet formats just >>> fine: https://go.dev/play/p/3GqFunldeq0 >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/0dd15d6e-a01c-4815-a09c-9970e0f78b32n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/golang-nuts/0dd15d6e-a01c-4815-a09c-9970e0f78b32n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/6e4688f2-637c-47c3-bb8c-a61e45178d1cn%40googlegroups.com.