Commit Graph

6 Commits (211995bc3c68b579be5d213c6d7ab48eceda173e)

Author SHA1 Message Date
Kyle Havlovitz 14a7ffc098
Convert kv commands to use base.Command 2017-02-08 19:26:24 -05:00
James Nugent ae83b71b08 cli: Fix panic on empty data argument to `kv put`
Passing in an empty quoted argument from the shell currently panics as
we never check the length being greater than 0 prior to indexing into
the first rune, as illustrated in the test in this commit.

We also fix the panic, treating an empty string for data as equivalent
to not having passed it in the first place.
2017-01-05 08:02:38 -06:00
James Nugent 2e8f440ac7 cli: Add -base64 option to `consul kv put`
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`.
2017-01-04 16:12:21 -06:00
mckennajones 6bc1164825 Unit test for kv_put with negative values 2016-11-29 22:29:31 -08:00
Seth Vargo 39fb70ff67
Fix CAS operations for put 2016-09-26 16:06:56 -07:00
Seth Vargo 82bddd7f9b
Add kv put command 2016-09-26 16:06:53 -07:00