Closed tomatod closed 6 months ago
You are correct; it does use context.AfterFunc
(I introduced this in January). I probably jumped the gun by a month or so on this. It would be possible to remove the call to context.AfterFunc
but doing so would complicate things a bit, so I think it's best to just move to supporting v1.21+.
I aim to support Go releases that are supported by the Go team (i.e. current version and one previous version); however I really only test with the latest release and don't update go.mod
unless I notice that I'm using a new feature. Now that Go 1.22 is out, we support Go 1.21+ and, as you say, should update the go.mod
to reflect this.
Thank you so much for developing this library. While I'm trying this library, There's a problem with test, so please let me an report. I'm sorry if i was wrong.
Describe the bug This library's go version is 1.20 (or later) according to go.mod, But context.AfterFunc is used in Connect function in paho/client.go .
But, context.AfterFunc is not included inGo version 1.20.x. It has been offered from version 1.21.x .
To reproduce After you switch to Go version 1.20.x and make test, you can get an error like the following.
Expected behaviour Test should be passed
Additional context The specified Go version in this library probably is required upgrading.
Best Regards,