-
Notifications
You must be signed in to change notification settings - Fork 831
[go] rewrite interface{} to any #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modernizes the Go codebase by replacing all instances of the legacy interface{} type with the modern any alias, which was introduced in Go 1.18. The changes were made using gofmt -w -r 'interface{} -> any' ., ensuring consistency across the codebase.
Changes:
- Replaced all occurrences of
interface{}withanyin type declarations, function signatures, and variable declarations - Updated code comments to reflect the new type nomenclature
- Cleaned up trailing whitespace in README.md
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go/types.go | Updated struct field types and type aliases from interface{} to any |
| go/session.go | Updated function parameter and variable types from interface{} to any |
| go/jsonrpc.go | Updated JSON-RPC struct types and function signatures from interface{} to any |
| go/generated_session_events.go | Updated generated code struct fields and utility function signatures from interface{} to any |
| go/e2e/session_test.go | Updated test code type declarations from interface{} to any |
| go/definetool_test.go | Updated test assertions and type casts from interface{} to any |
| go/definetool.go | Updated function return types and comments from interface{} to any |
| go/client_test.go | Updated test parameter types from interface{} to any |
| go/client.go | Updated function signatures, variable declarations, and map types from interface{} to any |
| go/README.md | Updated code examples from interface{} to any and removed trailing whitespace |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@qmuntal I merged your other PRs, this one has a merge conflict |
|
CI failures are unrelated to this PR. Will fix them in a follow-up PR. |
interface{}is a relic form the past. Rewrite it toanyusinggofmt -w -r 'interface{} -> any' ..