Skip to content

test: replace deprecated ioutil usage - #428

Open
dajiaohuang wants to merge 1 commit into
cloudwego:mainfrom
dajiaohuang:fix/427-go126-ioutil
Open

test: replace deprecated ioutil usage#428
dajiaohuang wants to merge 1 commit into
cloudwego:mainfrom
dajiaohuang:fix/427-go126-ioutil

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

Replace the deprecated io/ioutil test usage with io.ReadAll so the repository's stable-Go lint job no longer reports SA1019.

Root cause

The v0.7.5 tag workflow resolves go-version: stable to Go 1.26.5. Staticcheck flags the remaining io/ioutil import in nocopy_readwriter_test.go, causing the otherwise successful release workflow to stay red.

Changes

  • remove the deprecated io/ioutil import
  • use the equivalent io.ReadAll API already available in the module's Go 1.20 baseline

This is test-only and does not change runtime behavior or public APIs.

Verification

  • go test -timeout=2m -count=1 -race ./... (Linux amd64, Go 1.20.14)
  • go test -timeout=2m -count=1 -race ./... (Linux amd64, Go 1.25.14)
  • golangci-lint run (v1.64.8)
  • go vet ./... (Windows amd64, Go 1.26.3)
  • go mod verify (Windows amd64, Go 1.26.3)

Fixes #427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

CI: Go 1.26 lint fails on deprecated io/ioutil usage

1 participant