etcdctlv3: separate out cmd parsing logic for creating client

This commit is contained in:
Xiang Li
2016-02-15 14:44:25 -08:00
parent 03a7f2e10f
commit d78cff2c4a
10 changed files with 44 additions and 27 deletions

View File

@ -43,7 +43,7 @@ func compactionCommandFunc(cmd *cobra.Command, args []string) {
ExitWithError(ExitError, err)
}
c := mustClient(cmd)
c := mustClientFromCmd(cmd)
if cerr := clientv3.NewKV(c).Compact(context.TODO(), rev); cerr != nil {
ExitWithError(ExitError, cerr)
return