Remove unused fields from handlerCapture test struct#1244
Merged
lpcox merged 2 commits intocopilot/update-tool-logging-formatfrom Feb 21, 2026
Merged
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions workflow lint
Remove unused fields from handlerCapture test struct
Feb 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a linter failure in the GitHub Actions workflow by removing unused struct fields from the test helper handlerCapture in internal/server/sdk_logging_test.go. The CI linter correctly identified that the statusCode and responseBody fields were declared but never accessed anywhere in the test code.
Changes:
- Removed unused
statusCodeandresponseBodyfields from thehandlerCapturestruct, which tracks what an inner HTTP handler receives during tests
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
golangci-lintwas failing withunusederrors on two fields in thehandlerCapturestruct ininternal/server/sdk_logging_test.go.Change
Removed
statusCodeandresponseBodyfromhandlerCapture— both values are passed as parameters tomakeInnerHandlerand written directly tohttp.ResponseWriter, never stored back into the struct.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
example.com/tmp/go-build2191527050/b279/launcher.test /tmp/go-build2191527050/b279/launcher.test -test.testlogfile=/tmp/go-build2191527050/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo 64/src/regexp/syntax/compile.go x_amd64/compile user.email 7973+lpcox@users-unsafeptr=false(dns block)invalid-host-that-does-not-exist-12345.com/tmp/go-build2191527050/b264/config.test /tmp/go-build2191527050/b264/config.test -test.testlogfile=/tmp/go-build2191527050/b264/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo ed struct fields in sdk_logging_--64 .12/x64/as pull.rebase(dns block)nonexistent.local/tmp/go-build2191527050/b279/launcher.test /tmp/go-build2191527050/b279/launcher.test -test.testlogfile=/tmp/go-build2191527050/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo 64/src/regexp/syntax/compile.go x_amd64/compile user.email 7973+lpcox@users-unsafeptr=false(dns block)slow.example.com/tmp/go-build2191527050/b279/launcher.test /tmp/go-build2191527050/b279/launcher.test -test.testlogfile=/tmp/go-build2191527050/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo 64/src/regexp/syntax/compile.go x_amd64/compile user.email 7973+lpcox@users-unsafeptr=false(dns block)this-host-does-not-exist-12345.com/tmp/go-build2191527050/b288/mcp.test /tmp/go-build2191527050/b288/mcp.test -test.testlogfile=/tmp/go-build2191527050/b288/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true ache/go/1.25.6/x64/src/runtime/cgo1.25.6 z7W-/HuzXJ-P4m3m2aPTQz7W- x_amd64/vet(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.