I have a public module that uses Go v1.18BETA1 but the checks are made using an older version (I am guessing 1.17) on gofmt and ineffassign which gives error related to generics syntax.
Example gofmt:
either/right.go
Line 5: expected ']', found any:1::warning: file is not gofmted with -s (gofmt)
maybe/maybe.go
Line 6: expected ';', found '|':1::warning: file is not gofmted with -s (gofmt)
Line 9: expected '}', found 'type':1::warning: file is not gofmted with -s (gofmt)
Line 20: expected ']', found any:1::warning: file is not gofmted with -s (gofmt)
Line 26: expected declaration, found 'if':1::warning: file is not gofmted with -s (gofmt)
either/either.go
Line 5: expected ']', found any:1::warning: file is not gofmted with -s (gofmt)
Line 27: expected ']', found any:1::warning: file is not gofmted with -s (gofmt)
either/either_test.go
Line 127: expected ']' or ':', found ',':1::warning: file is not gofmted with -s (gofmt)
Line 149: expected ']' or ':', found ',':1::warning: file is not gofmted with -s (gofmt)
Line 165: expected ']' or ':', found ',':1::warning: file is not gofmted with -s (gofmt)
Line 179: expected ']' or ':', found ',':1::warning: file is not gofmted with -s (gofmt)
Line 197: expected ']' or ':', found ',':1::warning: file is not gofmted with -s (gofmt)
Line 217: expected ']' or ':', found ',':1::warning: file is not gofmted with -s (gofmt)
Line 239: expected ']' or ':', found ',':1::warning: file is not gofmted with -s (gofmt)
Line 261: expected ']' or ':', found ',':1::warning: file is not gofmted with -s (gofmt)
result/result.go
Line 5: expected ']', found any:1::warning: file is not gofmted with -s (gofmt)
Line 22: expected ']', found any:1::warning: file is not gofmted with -s (gofmt)
Line 29: expected declaration, found 'return':1::warning: file is not gofmted with -s (gofmt)
either/left.go
Line 5: expected ']', found any:1::warning: file is not gofmted with -s (gofmt)
I can confirm gofmt on v1.18 does not return any issues.
How to replicate:
$ git clone https://github.com/medmouine/gomad
$ gobrew use 1.17
$ gofmt -s -d .
either/either.go:11:15: expected ']', found any
either/either.go:33:15: expected ']', found any
either/either_test.go:127:13: expected ']' or ':', found ','
either/either_test.go:149:13: expected ']' or ':', found ','
either/either_test.go:165:21: expected ']' or ':', found ','
either/either_test.go:179:21: expected ']' or ':', found ','
either/either_test.go:197:21: expected ']' or ':', found ','
either/either_test.go:217:21: expected ']' or ':', found ','
either/either_test.go:239:13: expected ']' or ':', found ','
either/either_test.go:261:13: expected ']' or ':', found ','
either/left.go:5:13: expected ']', found any
either/right.go:5:14: expected ']', found any
maybe/maybe.go:6:6: expected ';', found '|'
maybe/maybe.go:15:1: expected '}', found 'type'
maybe/maybe.go:26:14: expected ']', found any
maybe/maybe.go:35:2: expected declaration, found 'if'
result/result.go:9:15: expected ']', found any
result/result.go:26:15: expected ']', found any
result/result.go:36:2: expected declaration, found 'return'
$ gobrew use 1.18beta1
$ gofmt -s -d .
$
I have a public module that uses Go
v1.18BETA1
but the checks are made using an older version (I am guessing 1.17) ongofmt
andineffassign
which gives error related to generics syntax.Example gofmt:
I can confirm
gofmt
onv1.18
does not return any issues.How to replicate: