-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor(version): skip extra info if empty #18438
Conversation
WalkthroughWalkthroughThe overall change involves a simplification of the codebase by eliminating the use of pointers for the Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- version/command.go (1 hunks)
- version/version.go (1 hunks)
Files skipped from review due to trivial changes (1)
- version/command.go
Additional comments: 1
version/version.go (1)
- 71-74: The change from a pointer to a non-pointer type for
ExtraInfo
in theInfo
struct is a good move for simplicity and safety. It eliminates the need to check for nil before accessingExtraInfo
. However, ensure that all usages ofExtraInfo
in the codebase are updated to reflect this change.
Description
Follow-up of #18063.
Noticed while backporting it to v0.50 that empty extra info would always be marshalled as null. This PR fixes that and only display extra info if present.
This PR will be cherry-picked in #18437
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking changeSummary by CodeRabbit
ExtraInfo
field in theInfo
struct for better data management.