mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #2640 from xiang90/import
etcdctl: refactor message in import command
This commit is contained in:
commit
c66777f80f
@ -26,7 +26,7 @@ func NewImportSnapCommand() cli.Command {
|
||||
Usage: "import a snapshot to a cluster",
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{Name: "snap", Value: "", Usage: "Path to the vaild etcd 0.4.x snapshot."},
|
||||
cli.StringSliceFlag{Name: "hidden", Value: nil, Usage: "Hidden key space to import from snapshot"},
|
||||
cli.StringSliceFlag{Name: "hidden", Value: new(cli.StringSlice), Usage: "Hidden key spaces to import from snapshot"},
|
||||
cli.IntFlag{Name: "c", Value: 10, Usage: "Number of concurrent clients to import the data"},
|
||||
},
|
||||
Action: handleImportSnap,
|
||||
@ -37,7 +37,7 @@ func handleImportSnap(c *cli.Context) {
|
||||
d, err := ioutil.ReadFile(c.String("snap"))
|
||||
if err != nil {
|
||||
if c.String("snap") == "" {
|
||||
fmt.Printf("no snapshot file provided (use --snap)")
|
||||
fmt.Printf("no snapshot file provided (use --snap)\n")
|
||||
} else {
|
||||
fmt.Printf("cannot read snapshot file %s\n", c.String("snap"))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user