From 5ae55a2c0d2104b80a09def876f87fabee59babb Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 31 Mar 2015 16:41:35 -0400 Subject: [PATCH] etcdctl: fix import typos --- etcdctl/command/import_snap_command.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etcdctl/command/import_snap_command.go b/etcdctl/command/import_snap_command.go index ad431bda9..dd9966812 100644 --- a/etcdctl/command/import_snap_command.go +++ b/etcdctl/command/import_snap_command.go @@ -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