all: modernize code#868
Merged
maciej-kisiel merged 2 commits intomodelcontextprotocol:mainfrom Mar 31, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Modernizes the Go SDK codebase by applying go fix ./..., aligning tests/examples with newer Go language/library features.
Changes:
- Replaced
interface{}withanyin maps and test struct fields. - Updated goroutine +
WaitGrouppatterns to usewg.Go(...). - Switched some test/bench contexts to
t.Context()/b.Context()and modernized simple loops (e.g.,for range 3).
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| oauthex/token_exchange_test.go | Uses map[string]any in test response payload. |
| mcp/streamable_test.go | Modernizes WaitGroup goroutine spawning and uses t.Context() in a test. |
| mcp/streamable_bench_test.go | Uses b.Context() and removes now-unneeded context import. |
| mcp/schema_cache_test.go | Replaces counted loop with for range 3. |
| mcp/mcp_test.go | Replaces manual WaitGroup goroutine pattern with wg.Go. |
| mcp/content_nil_test.go | Updates test struct fields from interface{} to any. |
| mcp/cmd_test.go | Uses t.Context() instead of context.WithCancel(...) in tests. |
| internal/oauthtest/fake_authorization_server.go | Uses map[string]any for JSON encoding. |
| examples/server/distributed/main.go | Uses wg.Go(...) for child/server goroutines. |
| examples/client/loadtest/main.go | Uses wg.Go(...) for worker goroutines. |
| docs/protocol.md | Removes trailing whitespace/blank line at EOF. |
| auth/extauth/oidc_login_test.go | Uses map[string]any and updates helper signature accordingly. |
| auth/extauth/enterprise_handler_test.go | Uses map[string]any for WithExtra(...) and JSON encoding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Please revert |
7e116ed to
966ac34
Compare
Contributor
Author
|
@maciej-kisiel fixed, thank you |
maciej-kisiel
approved these changes
Mar 30, 2026
Contributor
|
Could you also merge with |
Contributor
Author
|
@maciej-kisiel done |
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.
Use
go fix ./...to modernize the code.