-
Notifications
You must be signed in to change notification settings - Fork 52
Refactor table helpers #579
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
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 refactors the codebase to extract table-related functionality from the report package into a new dedicated table package, improving modularity and separation of concerns. The refactoring moves table definitions, helper functions, type definitions, and table value processing logic while maintaining all existing functionality through updated imports and references.
Key changes:
- Created new
internal/tablepackage with extracted table logic - Updated all consumers to import and use
tablepackage instead ofreport - Introduced renderer registration pattern for custom table rendering
- Moved test files to align with new package structure
Reviewed changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
internal/table/*.go |
New table package files containing extracted logic from report package |
internal/table/*_test.go |
Test files moved/created for table package |
internal/report/*.go |
Updated to use table package and implement renderer registration |
internal/common/common.go |
Updated imports and type references to use table package |
cmd/*/ |
Updated command files to use table package for table name constants |
go.mod |
Added module replace directive for new table package |
internal/report/table_helpers*.go |
Deleted files as logic moved to table package |
internal/report/*_defs.go |
Deleted definition files moved to table package |
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
This pull request refactors the codebase to replace direct dependencies on the
reportpackage for table-related constants, types, and functions with the newtablepackage. This change improves modularity and separation of concerns by centralizing all table-related logic in thetablepackage. No functional behavior is changed, but many files are updated to use the new import and references.This refactor should make it easier to maintain and extend table-related functionality in the future, as all such logic is now centralized in the
tablepackage.