Remove unused fields from handlerCapture test struct - #1242
Merged
lpcox merged 2 commits intoFeb 21, 2026
Merged
Conversation
…apture 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
lpcox
marked this pull request as ready for review
February 21, 2026 18:57
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes two unused fields from the handlerCapture test helper struct in internal/server/sdk_logging_test.go. The golangci-lint unused linter identified that statusCode and responseBody fields were defined but never read or written. While these values are passed as parameters to makeInnerHandler, they were never stored back onto the struct. Tests verify response status and body through the httptest.ResponseRecorder instead.
Changes:
- Removed unused
statusCodeandresponseBodyfields from thehandlerCapturetest struct
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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-lint(unusedlinter) was failing CI due to two struct fields in a test helper that were never read or written.Change
Removed
statusCodeandresponseBodyfromhandlerCaptureininternal/server/sdk_logging_test.go— these values are passed as parameters tomakeInnerHandlerbut were never stored back onto 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-build3958490663/b275/launcher.test /tmp/go-build3958490663/b275/launcher.test -test.testlogfile=/tmp/go-build3958490663/b275/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -c=4 -nolocalimports -importcfg /tmp/go-build3958490663/b232/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/santhosh-tekuri/jsonschema/v5@v5.3.1/compiler.go /home/REDACTED/go/pkg/mod/github.com/santhosh-tekuri/jsonschema/v5@v5.3.1/content.go conf�� go user.name git(dns block)invalid-host-that-does-not-exist-12345.com/tmp/go-build3958490663/b260/config.test /tmp/go-build3958490663/b260/config.test -test.testlogfile=/tmp/go-build3958490663/b260/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true go base64/base64.go-imultiarch 64/pkg/tool/linux86_64-linux-gnu r(dns block)nonexistent.local/tmp/go-build3958490663/b275/launcher.test /tmp/go-build3958490663/b275/launcher.test -test.testlogfile=/tmp/go-build3958490663/b275/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -c=4 -nolocalimports -importcfg /tmp/go-build3958490663/b232/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/santhosh-tekuri/jsonschema/v5@v5.3.1/compiler.go /home/REDACTED/go/pkg/mod/github.com/santhosh-tekuri/jsonschema/v5@v5.3.1/content.go conf�� go user.name git(dns block)slow.example.com/tmp/go-build3958490663/b275/launcher.test /tmp/go-build3958490663/b275/launcher.test -test.testlogfile=/tmp/go-build3958490663/b275/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -c=4 -nolocalimports -importcfg /tmp/go-build3958490663/b232/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/santhosh-tekuri/jsonschema/v5@v5.3.1/compiler.go /home/REDACTED/go/pkg/mod/github.com/santhosh-tekuri/jsonschema/v5@v5.3.1/content.go conf�� go user.name git(dns block)this-host-does-not-exist-12345.com/tmp/go-build3958490663/b284/mcp.test /tmp/go-build3958490663/b284/mcp.test -test.testlogfile=/tmp/go-build3958490663/b284/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true go H6RJmYT_A /usr/bin/git =fetch(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.