Format readme.md
Signed-off-by: Tao He <sighingnow@gmail.com>
This commit is contained in:
parent
fcc5807748
commit
09f665fe3e
16
README.md
16
README.md
|
|
@ -569,12 +569,12 @@ keys defined by the prefix. mkdir method is removed since etcdv3 treats everythi
|
||||||
|
|
||||||
3. Removing directory:
|
3. Removing directory:
|
||||||
|
|
||||||
If you want the delete recursively then you have to pass a second `true` parameter
|
If you want the delete recursively then you have to pass a second `true` parameter
|
||||||
to rmdir and supply a key. This key will be treated as a prefix. All keys that match the
|
to rmdir and supply a key. This key will be treated as a prefix. All keys that match the
|
||||||
prefix will be deleted. All deleted keys will be placed in `response.values()` and
|
prefix will be deleted. All deleted keys will be placed in `response.values()` and
|
||||||
`response.keys()`. This parameter defaults to `false`.
|
`response.keys()`. This parameter defaults to `false`.
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
etcd::Client etcd("http://127.0.0.1:2379");
|
etcd::Client etcd("http://127.0.0.1:2379");
|
||||||
etcd.set("/test/key1", "foo");
|
etcd.set("/test/key1", "foo");
|
||||||
etcd.set("/test/key2", "bar");
|
etcd.set("/test/key2", "bar");
|
||||||
|
|
@ -585,10 +585,10 @@ prefix will be deleted. All deleted keys will be placed in `response.values()` a
|
||||||
std::cout << resp.keys(i);
|
std::cout << resp.keys(i);
|
||||||
std::cout << " = " << resp.value(i).as_string() << std::endl;
|
std::cout << " = " << resp.value(i).as_string() << std::endl;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
However, if recursive parameter is false, functionality will be the same as just deleting a key.
|
However, if recursive parameter is false, functionality will be the same as just deleting a key.
|
||||||
The key supplied will NOT be treated as a prefix and will be treated as a normal key name.
|
The key supplied will NOT be treated as a prefix and will be treated as a normal key name.
|
||||||
|
|
||||||
### Using binary data as key and value
|
### Using binary data as key and value
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue