etcdctl: fix import typos

This commit is contained in:
Barak Michener 2015-03-31 16:41:35 -04:00 committed by Yicheng Qin
parent 62ce6eef7b
commit 5ae55a2c0d

View File

@ -35,7 +35,11 @@ func NewImportSnapCommand() cli.Command {
func handleImportSnap(c *cli.Context) {
d, err := ioutil.ReadFile(c.String("snap"))
if err != nil {
fmt.Printf("cannot read snapshot file %s\n", c.String("snap"))
if c.String("snap") == "" {
fmt.Printf("no snapshot file provided (use --snap)")
} else {
fmt.Printf("cannot read snapshot file %s\n", c.String("snap"))
}
os.Exit(1)
}
@ -90,7 +94,7 @@ func copyKeys(n *store.NodeExtern, setc chan set) int {
setc <- set{n.Key, *n.Value, n.TTL}
return 1
}
log.Println("entrying dir:", n.Key)
log.Println("entering dir:", n.Key)
for _, nn := range n.Nodes {
sub := copyKeys(nn, setc)
num += sub