feat: add logout command#1016
Conversation
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1016 +/- ##
=========================================
- Coverage 10.99% 9.40% -1.59%
=========================================
Files 173 322 +149
Lines 8671 16122 +7451
=========================================
+ Hits 953 1516 +563
- Misses 7612 14471 +6859
- Partials 106 135 +29 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
NucleoFusion
left a comment
There was a problem hiding this comment.
Is this not what
harbor-cli context delete does?
And context delete also has support for providing a name?
|
Yeah, this is mainly for better UX and discoverability, most CLI tools have a login/logout pairing |
NucleoFusion
left a comment
There was a problem hiding this comment.
Im still conflicted on whether this is a meaningful enough change yk
But that is for the meet, while that is being done, here is a review anyway
| fmt.Printf("Log out from '%s'? [y/N]: ", currentName) | ||
|
|
There was a problem hiding this comment.
Should be in prompt and use charm/huh
|
@NucleoFusion @Sypher845 I also think that logout can be an alias for context delete at maximum. But it would reimplement the same functionality twice. Making it a convenience proxy might be discussed. |
Description
Adds a harbor logout command for better UX, gives users a simple, discoverable way to remove their current credentials from the local config, mirroring the standard login / logout pairing found in CLI tools. Includes a confirmation prompt with -y flag.
Command
harbor logoutType of Change