Conversation
…util.go - Eliminate util.go: move path helpers to system_variables.go, inline instanceOf, replace ToSortFunc with cmp.Compare, move toRow/sliceOf to statement_processing.go - Extract streamio/ sub-package: move StreamManager and its tests to internal/mycli/streamio/ as a zero-dependency I/O multiplexer - Extract decoder/ sub-package: move proto/spanner value formatting to internal/mycli/decoder/ with exported FormatConfigWithProto, FormatTypeSimple, FormatTypeVerbose Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @apstndb, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request undertakes a significant refactoring of the core Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Code Metrics Report📊 View detailed coverage report (available for 7 days)
DetailsCode coverage of files in pull request scope (73.9% → 73.9%)
Reported by octocov |
There was a problem hiding this comment.
Code Review
This pull request is a significant structural refactoring that extracts streamio and decoder logic into their own sub-packages and eliminates the util.go file. The changes are well-organized and improve the project's modularity by creating clearer boundaries for I/O management and data decoding. The inlining of utility functions and replacement of custom helpers with standard library features (like cmp.Compare) are good simplifications. My review focuses on ensuring the newly created public APIs are well-documented as per the repository's style guide.
Address review feedback: add documentation comment to the newly exported FormatConfigWithProto function in the decoder package. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/gemini summary |
|
/gemini review |
Summary of ChangesThis pull request significantly refactors the core Highlights
Changelog
Activity
|
There was a problem hiding this comment.
Code Review
The pull request performs a significant structural refactoring by extracting streamio and decoder sub-packages and eliminating util.go. The changes generally improve modularity and reduce intra-package dependencies. I have identified one critical issue in the decoder package where an unknown enum value could cause a nil pointer dereference and panic during result formatting. While addressing critical behavioral issues in a structural refactoring PR can sometimes conflict with our guideline to separate such changes, the proposed fix correctly uses a guard condition to prevent the panic, aligning with our error handling practices. Other changes, including the new StreamManager implementation and the migration of utility functions, appear correct and follow the project's Go 1.25 standards and concurrency guidelines.
Summary
util.go: Move path helpers tosystem_variables.go, inlineinstanceOf, replaceToSortFuncwithcmp.Compare, movetoRow/sliceOftostatement_processing.gostreamio/sub-package: MoveStreamManagerand its tests tointernal/mycli/streamio/as a zero-dependency I/O multiplexer (stdlib +golang.org/x/termonly)decoder/sub-package: Move proto/spanner value formatting tointernal/mycli/decoder/with exportedFormatConfigWithProto,FormatTypeSimple,FormatTypeVerboseBased on go-filedeps analysis: reduces file count and intra-package edges in
internal/mycli/.Test plan
make checkpasses (test + lint + fmt-check)streamioanddecodersub-packages have their own passing tests🤖 Generated with Claude Code