Closed maxlath closed 3 years ago
T.Cleanup was added in Go 1.14, so you need at least Go 1.14. It's possible that you actually need a newer version for other things; I'm not 100% sure off-hand.
Go 1.13 is two years old, and compatibility is highly valued. You shouldn't have any problems updating to a newer version.
I confirmed it compiles with Go 1.14, and added a more explicit error when you're trying to use an older version with a work-around I used earlier, so this should at least clarify things in the future.
Supporting older versions of Go isn't really something I want to spend time on I'm afraid; I know some distros use rather old Go versions, but it's easy to install a newer version and since compatibility is highly valued this is rarely (if ever) a problem too. It's also not a 2-minute fix in this case since the problem is in a dependency (a dependency I maintain, but still, and the Cleanup function simplifies a few things). And you can also use the binary downloads of course; since they're statically built they should work on any Linux system.
That's indeed what Ubuntu 20.04 offers by default >< But, for any future readers, a more recent go version can be installed via a ppa, and now it works just fine. Thanks for the quick answer!
Cheers; it's also easy to download/install from the golang.org website.
I understand why Ubuntu, Debian, etc. want to offer a long-term stable version, but it's pretty annoying as these Go versions aren't even supported by the Go team any more, and newer versions often add useful new features and I'd rather not wait 3+ years for all distros to catch up. I added the binary downloads largely for this reason.
hi :)
Env
go version go1.13.8 linux/amd64
Bug
running
go build
produces the following output and exits with a non-zero code