From 74e35b1f482d1cae10c5995bbe43161ef67e2236 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Mon, 26 Sep 2016 16:13:39 -0700 Subject: [PATCH] Fix kv put flags --- command/kv_delete.go | 7 +++---- command/kv_put.go | 10 ++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/command/kv_delete.go b/command/kv_delete.go index 4fa620a21..85b30b4c8 100644 --- a/command/kv_delete.go +++ b/command/kv_delete.go @@ -37,10 +37,9 @@ Usage: consul kv delete [options] KEY_OR_PREFIX KV Delete Options: - -cas Perform a Check-And-Set operation. If this value is - specified without -modify-index, the key will first be - fetched and the resulting ModifyIndex will be used on - the next query. The default value is false. + -cas Perform a Check-And-Set operation. Specifying this + value also requires the -modify-index flag to be set. + The default value is false. -modify-index= Unsigned integer representing the ModifyIndex of the key. This is used in combination with the -cas flag. diff --git a/command/kv_put.go b/command/kv_put.go index f90306a33..28c5d98fa 100644 --- a/command/kv_put.go +++ b/command/kv_put.go @@ -62,10 +62,9 @@ KV Put Options: lock. The session must already exist and be specified via the -session flag. The default value is false. - -cas Perform a Check-And-Set operation. If this value is - specified without -modify-index, the key will first be - fetched and the resulting ModifyIndex will be used on - the next query. The default value is false. + -cas Perform a Check-And-Set operation. Specifying this + value also requires the -modify-index flag to be set. + The default value is false. -flags= Unsigned integer value to assign to this key-value pair. This value is not read by Consul, so clients can @@ -73,8 +72,7 @@ KV Put Options: The default value is 0 (no flags). -modify-index= Unsigned integer representing the ModifyIndex of the - key. This is often combined with the -cas flag, but it - can be specified for any key. The default value is 0. + key. This is used in combination with the -cas flag. -release Forfeit the lock on the key at the givne path. This requires the -session flag to be set. The key must be