mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: print out key and action when watching recursively
This commit is contained in:
parent
87ef0f0b3e
commit
9f9661f513
@ -16,6 +16,7 @@ package command
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
|
||||||
@ -72,6 +73,10 @@ func watchCommandFunc(c *cli.Context, ki client.KeysAPI) {
|
|||||||
if resp.Node.Dir {
|
if resp.Node.Dir {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if recursive {
|
||||||
|
fmt.Printf("[%s] %s\n", resp.Action, resp.Node.Key)
|
||||||
|
}
|
||||||
|
|
||||||
printResponseKey(resp, c.GlobalString("output"))
|
printResponseKey(resp, c.GlobalString("output"))
|
||||||
|
|
||||||
if !forever {
|
if !forever {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user