etcdctlv3: use spf13/cobra for cli interface#3922
Conversation
817c6af to
67a6a94
Compare
|
The biggest problem is we will break every single user that is using a On Tue, Nov 24, 2015 at 10:12 PM Gyu-Ho Lee notifications@github.com
|
|
@philips good point. I was thinking only replacing the etcdctl* with cobra because they are already in codegansta/cli which uses --long and -short style. Etcdmain is written with standard flag package and supports both single and double dash, so there is no reason to change that I think. Thanks! |
|
I don't mind changing libraries, we just can't break etcd's flags. On Wed, Nov 25, 2015 at 7:30 AM Gyu-Ho Lee notifications@github.com wrote:
|
|
@gyuho Well... There is also the current etcdctl not only etcdctlv3 |
|
You are right. I was going to split the PRs because What do you think? |
|
Fair enough. I don't mind dropping this PR :) |
|
We're not concerned about breaking etcdctlv3 CLI compatibility are we? |
|
@jonboulle no we are not @gyuho check this #2892 (comment) |
|
@gyuho OK. So probably here is what we should do: keep etcdctl the same. |
67a6a94 to
e18d083
Compare
|
@xiang90 I fixed as you suggested with godep dependencies. Please let me know if you have any feedback. Happy Thanksgiving all! |
|
@gyuho We need to separate the godep to another commit for easy review. |
|
Sure! I will separate when I get home. And cobra supports string slice. Sincerely,
|
|
@gyuho Do not worry. Take your time. Ideally we can make the change. But we can do it in another pr too. |
e18d083 to
8393a6c
Compare
|
@xiang90 Just split this into two commits. Please take a look again. Agree. We can migrate this to cobra first and then figure out how to handle Thanks! |
c8d5c18 to
b37ebba
Compare
This replaces codegansta/cli with spf13/cobra base on this guideline: https://github.com/coreos/docs/blob/master/golang/README.md#cli.
b37ebba to
b7647e0
Compare
|
@xiang90 Thanks for review. I pushed some updates:
Please take a look again. And let me know if you find anything wrong. |
|
LGTM |
|
Thanks! |
etcdctlv3: use spf13/cobra for cli interface
/cc @jonboulle @xiang90
Reference: https://github.com/coreos/rkt/blob/master/rkt/rkt.go
This replaces
codegansta/cliwithspf13/cobraaccording tohttps://github.com/coreos/docs/blob/master/golang/README.md#cli.
Here's the sample output: