1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 04:22:22 +00:00
This commit is contained in:
Xargin 2018-08-21 16:32:54 +08:00
parent 08d8597721
commit bb2b2c2c88

View File

@ -70,7 +70,7 @@ if err != nil {
```go ```go
kapi := client.NewKeysAPI(c) kapi := client.NewKeysAPI(c)
w := kapi.Watcher("/name", nil) w := kapi.Watcher("/path/to/your/config", nil)
go func() { go func() {
for { for {
resp, err := w.Next(context.Background()) resp, err := w.Next(context.Background())