contrib/recipes/client.go
func deleteRevKey(kv v3.KV, key string, rev int64) (bool, error) {
	cmp := v3.Compare(v3.ModRevision(key), "=", rev)
	req := v3.OpDelete(key)
	txnresp, err := kv.Txn(context.TODO()).If(cmp).Then(req).Commit()
	if err != nil {
		return false, err
	} else if !txnresp.Succeeded {
		return false, nil
	}
	return true, nil
}
func deleteRevKey(kv v3.KV, key string, rev int64) (bool, error) {
	cmp := v3.Compare(v3.ModRevision(key), "=", rev)
	req := v3.OpDelete(key)
	txnresp, err := kv.Txn(context.TODO()).If(cmp).Then(req).Commit()
	if err != nil {
		return false, err
	} else if !txnresp.Succeeded {
		return false, nil
	}
	return true, nil
}
func deleteRevKey ( kv v3 . KV , key string , rev int64 ) ( bool , error ) { cmp := v3 . Compare ( v3 . ModRevision ( key ) , " " , rev ) req := v3 . OpDelete ( key ) txnresp , err := kv . Txn ( context . TODO ( ) ) . If ( cmp ) . Then ( req ) . Commit ( ) if err != nil { return false , err } else if ! txnresp . Succeeded { return false , nil } return true , nil }
// deleteRevKey deletes a key by revision, returning false if key is missing
deleteRevKey deletes a key by revision returning false if key is missing