etcdctl: print out key and action when watching recursively

This commit is contained in:
Xiang Li 2015-07-01 12:57:14 -07:00 committed by Yicheng Qin
parent 87ef0f0b3e
commit 9f9661f513

View File

@ -16,6 +16,7 @@ package command
import (
"errors"
"fmt"
"os"
"os/signal"
@ -72,6 +73,10 @@ func watchCommandFunc(c *cli.Context, ki client.KeysAPI) {
if resp.Node.Dir {
continue
}
if recursive {
fmt.Printf("[%s] %s\n", resp.Action, resp.Node.Key)
}
printResponseKey(resp, c.GlobalString("output"))
if !forever {