-
Notifications
You must be signed in to change notification settings - Fork 687
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
feat: add update to auth cmd #450
feat: add update to auth cmd #450
Conversation
Signed-off-by: Alexandre Steppé <alexandre.steppe@gmail.com>
Signed-off-by: Alexandre Steppé <alexandre.steppe@gmail.com>
Merging last updates from main
Merging latest updates
Hello, thank you very much for your contribution. I just reviewed your PR. It seems like it implements an update method that requires setting all the fields. Imagine if the user wants to modify only the password in their configuration or the model without having to fill in all the other fields. I think it would be interesting to lean more towards this implementation. What do you think ? |
@matthisholleville indeed this is what I'm trying to achieve, now because I reused the viper.Set() method at line 74, it reimplements all default empty values from the flags declared alongside the changes one. Do you know how I could keep the change passed with a flag and leave the rest untouched ? |
Check if the flag is not empty? I don't think flags should have default values in the case of an update. |
merge latest changes
Signed-off-by: Alexandre Steppé <alexandre.steppe@gmail.com>
Signed-off-by: Alexandre Steppé <alexandre.steppe@gmail.com>
@matthisholleville I made a couple changes and it's now working, changes are only applied for the flags used. I still feel like this could use some nice refactoring at a certain point tho |
Hello @HatiCode can you please provide an example of the commande ? |
@matthisholleville |
Closes #388
📑 Description
This PR adds an update subcommand to the auth command, allowing to update a key in a previously configured provider e.g: password, model...
It also fixes a couple typos met along the way.
✅ Checks
ℹ Additional Information