CI: Go 1.26 lint fails on deprecated io/ioutil usage
- Dominant language
- Go
- Stars
- 4.6k
- Forks
- 505
- PR merge metrics
- No merged PRs in 30d
Description
### 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
1. Check out `d63d249a3ba0dc9675a85c9762242247c368e500` (v0.7.5).
2. Run the repository's `golangci-lint` job with Go stable (the failing run resolved Go 1.26.5 and golangci-lint v1.64.8).
3. Observe:
```text
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
Contributor guide
Research direction
Open nocopy_readwriter_test.go and inspect the deprecated io/ioutil import and ReadAll usage described in the lint output. Replace that test-only usage with the current equivalent, remove the deprecated import, and rerun the repository's golangci-lint job with the stable Go toolchain; done means the lint job passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ci-cd, testing
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100