Skip to content

Commit 086d0ab

Browse files
authored
Update examples.md
1 parent 93ab0e6 commit 086d0ab

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

docs/examples.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#Examples
1+
# Examples
22

33
This document contains useful example of usage for `libkv`. It might not be complete but provides with general informations on how to use the client.
44

5-
##Create a store and use Put/Get/Delete
5+
## Create a store and use Put/Get/Delete
66

77
```go
88
package main
@@ -62,7 +62,7 @@ func main() {
6262
}
6363
```
6464

65-
##List keys
65+
## List keys
6666

6767
```go
6868
// List will list all the keys under `key` if it contains a set of child keys/values
@@ -73,7 +73,7 @@ for _, pair := range entries {
7373

7474
```
7575

76-
##Watching for events on a single key (Watch)
76+
## Watching for events on a single key (Watch)
7777

7878
You can use watches to watch modifications on a key. First you need to check if the key exists. If this is not the case, we need to create it using the `Put` function.
7979

@@ -97,7 +97,7 @@ select {
9797

9898
```
9999

100-
##Watching for events happening on child keys (WatchTree)
100+
## Watching for events happening on child keys (WatchTree)
101101

102102
You can use watches to watch modifications on a key. First you need to check if the key exists. If this is not the case, we need to create it using the `Put` function. There is a special step here though if you want your code to work across backends. Because `etcd` is a special case and it makes the distinction between directories and keys, we need to make sure that the created key is considered as a directory by enforcing `IsDir` at `true`.
103103

@@ -154,4 +154,4 @@ err = lock.Unlock()
154154
if err != nil {
155155
fmt.Errorf("something went wrong when trying to unlock key %v", key)
156156
}
157-
```
157+
```

0 commit comments

Comments
 (0)