golanci-lint will only support the 2 latest version of go (1.18 and 1.19).
Pinning a previous version in the gihtub action seems to not work as expected.
After investigations the rules which produces ci fails are easy to fix manually. This PR offer this fix and some related ones.
Changes
The breaking changes in golangci-lint comes from go 1.19 new go fmt rules for body of code in documentation comments:
// A comment with a white space and a tab produces 'File is not `gofumpt`-ed with `-extra` (gofumpt)'
// a := Foo()
func Foo() Type {}
// A comment with only a tab is `gofumpt`-ed. There is no error
// a := Foo()
func Foo() Type {}
fixes gofumpt errors
fixes a dead reference to benchttp/runner instead of benchttp/engine in goimports:local-prefixes of golangci-lint configuration
fixes gosec error (G114: Use of net/http serve function that has no support for setting timeouts) for http.ListenAndServe: we may ignore it for convenience
Description
golanci-lint
will only support the 2 latest version of go (1.18 and 1.19). Pinning a previous version in the gihtub action seems to not work as expected. After investigations the rules which produces ci fails are easy to fix manually. This PR offer this fix and some related ones.Changes
The breaking changes in
golangci-lint
comes from go 1.19 newgo fmt
rules for body of code in documentation comments:gofumpt
errorsbenchttp/runner
instead ofbenchttp/engine
ingoimports:local-prefixes
ofgolangci-lint
configurationgosec
error (G114: Use of net/http serve function that has no support for setting timeouts
) forhttp.ListenAndServe
: we may ignore it for convenience