Skip to content

test(build): add missing io import in builder_test.go - #679

Merged
bergwolf merged 1 commit into
mainfrom
fix/builder-test-io-import
Oct 10, 2026
Merged

bergwolf merged 1 commit into
mainfrom
fix/builder-test-io-import

Conversation

@aftersnow

@aftersnow aftersnow commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The second commit of #592 moved the recordingStrategy helper into pkg/backend/build/builder_test.go. The helper uses io.Reader and io.Copy. The file does not import io.

As a result, go vet and golangci-lint fail on main with this error:

pkg/backend/build/builder_test.go:139:119: undefined: io

The Lint and CI workflows for commit 10a428a are red.

Fix

Add "io" to the import block of builder_test.go. No other change.

Verification

go vet ./pkg/backend/build/
go test -race -count=1 ./pkg/backend/build/
ok  	github.com/modelpack/modctl/pkg/backend/build	1.032s

The second commit of #592 moved recordingStrategy into builder_test.go.
The helper uses io.Reader and io.Copy, but the file does not import io.
As a result, go vet and golangci-lint fail on main with "undefined: io",
and the Lint and CI workflows for commit 10a428a are red.

Signed-off-by: Zhao Chen <zhaochen.zju@gmail.com>
@bergwolf
bergwolf merged commit 43991c2 into main Oct 10, 2026
5 checks passed
@bergwolf
bergwolf deleted the fix/builder-test-io-import branch October 10, 2026 14:47
aftersnow added a commit that referenced this pull request Oct 10, 2026
Same fix as #679. The recordingStrategy helper merged from main uses
io.Reader and io.Copy without importing io, which breaks go vet and
golangci-lint on this branch.

Signed-off-by: Zhao Chen <zhaochen.zju@gmail.com>
aftersnow added a commit that referenced this pull request Oct 10, 2026
Same fix as #679. The recordingStrategy helper merged from main uses
io.Reader and io.Copy without importing io, which breaks go vet and
golangci-lint on this branch.

Signed-off-by: Zhao Chen <zhaochen.zju@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants