Closed anon55555 closed 3 years ago
I don't think it's a good idea to change the required go version.
Why not?
Because this already happened to my server using multiserver. Luckily its not in production yet.
../go/src/github.com/anon55555/mt/rudp/listen.go:65:17: undefined: net.ErrClosed
../go/src/github.com/anon55555/mt/rudp/net.go:9:17: undefined: net.ErrClosed
../go/src/github.com/anon55555/mt/rudp/net.go:29:22: undefined: net.ErrClosed
../go/src/github.com/anon55555/mt/rudp/peer.go:95:19: undefined: net.ErrClosed
../go/src/github.com/anon55555/mt/rudp/peer.go:111:10: undefined: net.ErrClosed
../go/src/github.com/anon55555/mt/rudp/send.go:129:15: undefined: net.ErrClosed
You should update Go then.
It needs to be automized. Will sudo snap refresh go --edge
do it?
Maybe I'll give some advance warning if I do something like this in future.
It needs to be automized. Will
sudo snap refresh go --edge
do it?
Edge will give you the current development version, 1.16/stable is the latest release but it seems latest/stable is still on 1.15.8.
or you could do this:
cd /usr/local
rm -rf go
curl https://golang.org/dl/go1.16.linux-amd64.tar.gz | tar xz
then put /usr/local/go/bin in your PATH
sudo snap refresh go --channel 1.16/stable
should work too
Ok, thanks a lot.
Replaced rudp.ErrClosed with net.ErrClosed and updated go.mod, can this be closed now?
yes
You should use net.ErrClosed (added in Go 1.16) instead.