Description
The golangci-lint job for the v0.7.5 tag fails when the workflow resolves go-version: stable to Go 1.26.5. Staticcheck reports SA1019 because nocopy_readwriter_test.go still imports the deprecated io/ioutil package.
The same commit's compatibility, Windows, license-header, and spelling jobs pass; this lint failure leaves the release workflow red even though io.ReadAll has provided the same operation since Go 1.16.
Reproduction
- Check out
d63d249a3ba0dc9675a85c9762242247c368e500 (v0.7.5).
- Run the repository's
golangci-lint job with Go stable (the failing run resolved Go 1.26.5 and golangci-lint v1.64.8).
- Observe:
nocopy_readwriter_test.go:22:2: SA1019: "io/ioutil" has been deprecated since Go 1.19
Failing job: https://github.com/cloudwego/netpoll/actions/runs/31067912905/job/92509503706
Expected behavior
The repository's lint job should pass on its configured stable Go toolchain.
Suggested fix
Replace ioutil.ReadAll with io.ReadAll and remove the deprecated import. This is test-only and does not change runtime behavior or supported APIs.
Environment
- Repository commit:
d63d249a3ba0dc9675a85c9762242247c368e500
- Release: v0.7.5
- CI toolchain shown in the failing job: Go 1.26.5, golangci-lint v1.64.8, Ubuntu 24.04
Description
The
golangci-lintjob for the v0.7.5 tag fails when the workflow resolvesgo-version: stableto Go 1.26.5. Staticcheck reports SA1019 becausenocopy_readwriter_test.gostill imports the deprecatedio/ioutilpackage.The same commit's compatibility, Windows, license-header, and spelling jobs pass; this lint failure leaves the release workflow red even though
io.ReadAllhas provided the same operation since Go 1.16.Reproduction
d63d249a3ba0dc9675a85c9762242247c368e500(v0.7.5).golangci-lintjob with Go stable (the failing run resolved Go 1.26.5 and golangci-lint v1.64.8).Failing job: https://github.com/cloudwego/netpoll/actions/runs/31067912905/job/92509503706
Expected behavior
The repository's lint job should pass on its configured stable Go toolchain.
Suggested fix
Replace
ioutil.ReadAllwithio.ReadAlland remove the deprecated import. This is test-only and does not change runtime behavior or supported APIs.Environment
d63d249a3ba0dc9675a85c9762242247c368e500