build: upgrade to go 1.19 (#25726)

This changes the CI / release builds to use the latest Go version. It also
upgrades golangci-lint to a newer version compatible with Go 1.19.

In Go 1.19, godoc has gained official support for links and lists. The
syntax for code blocks in doc comments has changed and now requires a
leading tab character. gofmt adapts comments to the new syntax
automatically, so there are a lot of comment re-formatting changes in this
PR. We need to apply the new format in order to pass the CI lint stage with
Go 1.19.

With the linter upgrade, I have decided to disable 'gosec' - it produces
too many false-positive warnings. The 'deadcode' and 'varcheck' linters
have also been removed because golangci-lint warns about them being
unmaintained. 'unused' provides similar coverage and we already have it
enabled, so we don't lose much with this change.
This commit is contained in:
Felix Lange
2022-09-10 13:25:40 +02:00
committed by GitHub
parent 389021a5af
commit b628d72766
107 changed files with 997 additions and 973 deletions
-1
View File
@@ -77,7 +77,6 @@ func (bi *BigInt) SetInt64(x int64) {
// -1 if x < 0
// 0 if x == 0
// +1 if x > 0
//
func (bi *BigInt) Sign() int {
return bi.bigint.Sign()
}
+3 -3
View File
@@ -38,8 +38,8 @@ type Enode struct {
//
// For incomplete nodes, the designator must look like one of these
//
// enode://<hex node id>
// <hex node id>
// enode://<hex node id>
// <hex node id>
//
// For complete nodes, the node ID is encoded in the username portion
// of the URL, separated from the host by an @ sign. The hostname can
@@ -52,7 +52,7 @@ type Enode struct {
// a node with IP address 10.3.58.6, TCP listening port 30303
// and UDP discovery port 30301.
//
// enode://<hex node id>@10.3.58.6:30303?discport=30301
// enode://<hex node id>@10.3.58.6:30303?discport=30301
func NewEnode(rawurl string) (*Enode, error) {
node, err := enode.Parse(enode.ValidSchemes, rawurl)
if err != nil {
+1 -1
View File
@@ -20,7 +20,7 @@
// with pieces plucked from go-ethereum, rather to allow writing native dapps on
// mobile platforms. Keep this in mind when using or extending this package!
//
// API limitations
// # API limitations
//
// Since gomobile cannot bridge arbitrary types between Go and Android/iOS, the
// exposed APIs need to be manually wrapped into simplified types, with custom