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

cli: Add -base64 option to consul kv put #2632

Merged
merged 1 commit into from
Jan 4, 2017
Merged

cli: Add -base64 option to consul kv put #2632

merged 1 commit into from
Jan 4, 2017

Conversation

jen20
Copy link
Contributor

@jen20 jen20 commented Jan 4, 2017

This commit adds a -base64 option to the consul kv put command, which base 64 decodeds the data prior to writing it. This can be used in conjunction with consul kv get -base64 key implemented in #2632.

@jen20 jen20 added the type/enhancement Proposed improvement or new feature label Jan 4, 2017
if *base64encoded {
dataBytes, err = base64.StdEncoding.DecodeString(data)
if err != nil {
c.Ui.Error(fmt.Sprintf("Error! Cannot base-64 decode data: %s", err))
Copy link
Contributor

Choose a reason for hiding this comment

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

should be "base 64" to match other mentions in here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@slackpad
Copy link
Contributor

slackpad commented Jan 4, 2017

One tiny comment, otherwise LGTM.

This commit adds a -base64 option to the consul kv put command, which
base 64 decodeds the data prior to writing it. This can be used in
conjunction with `consul kv get -base64 key`.
@jen20 jen20 merged commit 0346e3e into master Jan 4, 2017
@jen20 jen20 deleted the kv-put-base64 branch January 4, 2017 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Proposed improvement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants