This repository was archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 299
Move to cli #1570
Closed
Closed
Move to cli #1570
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- rework option parsing - move away from (most) global variables (cAPI), keep currentCommand for now... - we need to pass c (the cli context) and cAPI (the client API) around Signed-off-by: Olaf Buddenhagen <[email protected]>
161ef0f to
c56d5e1
Compare
Contributor
|
@reneengelhard @antrik thanks for the work! So if tests pass, we need some lgtm here, will review it later. If of course there are no backward incompatibilities this should go in. Thanks again! |
Contributor
Contributor
|
@jonboulle just in time, alright. |
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 13, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * do not pass around cAPI all the time, but create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 13, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * do not pass around cAPI all the time, but create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 14, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * do not pass around cAPI all the time, but create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 14, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 14, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 14, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 14, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 17, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 17, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to endocode/fleet
that referenced
this pull request
May 19, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to endocode/fleet
that referenced
this pull request
May 19, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * create a parameter API for each run command, to wrap around cases from different contexts. * create a wrapper runWrapper() to be used for cobra. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 20, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * Create a wrapper runWrapper() to be used for cobra, to wrap around a normal run*() function into a prototype for cobra.Command.Run(). It also sets a global variable cAPI for running a normal command. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
May 20, 2016
Use Cobra (github.com/spf13/cobra) instead of cli (github.com/codegangsta/cli), for better cmdline user interface. * Create a wrapper runWrapper() to be used for cobra, to wrap around a normal run*() function into a prototype for cobra.Command.Run(). It also sets a global variable cAPI for running a normal command. * remove unnecessary code for codegangsta/cli from fleetctl.go. Suggested-by: Jonathan Boulle <[email protected]> Fixes: coreos#1453 Supersedes coreos#1570
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
while discussing #1453 and the implications of fixing it we thought it would make sense to move from our custom flag parsing to use 'cli' - as etcd already does.
Due to some difficulties and big(ger) restructuring needs of (test) code it took longer than anticipated, but here it is.
Passes the unit and functional tests. I rebased it upto current master so it includes the new
--replace switch, too
Regards,
Rene