-
Notifications
You must be signed in to change notification settings - Fork 23
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
Implement singleton pattern for NewRootCmd to prevent multiple creations #840
Implement singleton pattern for NewRootCmd to prevent multiple creations #840
Conversation
6c63b90
to
07b71e5
Compare
Signed-off-by: Anuj Chaudhari <[email protected]>
07b71e5
to
02cc270
Compare
Signed-off-by: Anuj Chaudhari <[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.
Nice solution!
Signed-off-by: Anuj Chaudhari <[email protected]>
bf4217d
to
901fd27
Compare
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.
LGTM
Thanks for doing this!
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.
LGTM. Thanks for the changes!
…ons (vmware-tanzu#840) * Only allow creating the NewRootCmd once with singleton pattern * Fix unit tests by using NewRootCmdForTest Signed-off-by: Anuj Chaudhari <[email protected]>
…ons (#840) * Only allow creating the NewRootCmd once with singleton pattern * Fix unit tests by using NewRootCmdForTest Signed-off-by: Anuj Chaudhari <[email protected]>
What this PR does / why we need it
Which issue(s) this PR fixes
Fixes #825
Describe testing done for PR
Release note
Additional information
Special notes for your reviewer