Skip to content
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

add an add command #87

Merged
merged 1 commit into from
Feb 23, 2021
Merged

add an add command #87

merged 1 commit into from
Feb 23, 2021

Conversation

mattlqx
Copy link
Collaborator

@mattlqx mattlqx commented Feb 21, 2021

this command is basically vault kv patch but it's nice to have inside
vsh when in interactive mode. you can simply add a key/value to a path.
this can save you time if you're doing other operations inside vsh.

i was also able to eliminate another duplication when creating new
commands by making fetching the Command object from the Commands struct
dynamic.

@mattlqx mattlqx force-pushed the add-command branch 2 times, most recently from 9e4a1ed to 5680201 Compare February 21, 2021 20:25
import (
"fmt"

"github.com/fishi0x01/vsh/client"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeClimate complains that this import is redundant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not sure what it's on about there. It doesn't compile without it as client is used in the file.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting 🤔
Once you merge #88 and rebase, it will evaluate again. Lets see what it says then. If it fails again, I will take a look

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Still failing. I will have a look 👍

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not exactly sure what the issue here is. It seems to me that codeclimate uses a govet wrapper https://github.com/codeclimate-community/codeclimate-govet

Might be this is a bug. Running go vet . locally doesn't show any errors. I've marked the issue in CodeClimate as invalid

this command is basically `vault kv patch` but it's nice to have inside
vsh when in interactive mode. you can simply add a key/value to a path.
this can save you time if you're doing other operations inside vsh.

i was also able to eliminate another duplication when creating new
commands by making fetching the Command object from the Commands struct
dynamic.
@fishi0x01 fishi0x01 mentioned this pull request Feb 22, 2021
Copy link
Owner

@fishi0x01 fishi0x01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! 👍

@mattlqx mattlqx merged commit 2b47d61 into master Feb 23, 2021
@mattlqx mattlqx deleted the add-command branch February 23, 2021 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants