Skip to content
This repository has been archived by the owner on May 24, 2019. It is now read-only.

handle global Flags #28

Open
root360-AndreasUlm opened this issue May 2, 2019 · 3 comments
Open

handle global Flags #28

root360-AndreasUlm opened this issue May 2, 2019 · 3 comments

Comments

@root360-AndreasUlm
Copy link
Contributor

While trying to solve #12 with PR #15 several options were discussed.
To move the discussion out of the PR and summarize the available options I create this issue.

The short summary of the problem #12 pointed out is that the current CLI lib does not inherit global flags into several subcommands (see urfave/cli#585)

The currently available options are:

  • switching to Cobra a different CLI lib (suggested by @noerw )
  • creating global flags and use append() to merge subcommand flags with global flags (suggested by @techknowlogick )

To compare both options I created a branch in my fork for each of them:

@root360-AndreasUlm
Copy link
Contributor Author

After implementing #26 I found this solution to be easier and the workaround seems to work quite well.
The switch to Cobra will take more time.

@lunny
Copy link
Member

lunny commented May 2, 2019

@root360-AndreasUlm I think #26 is easier for review.

@root360-AndreasUlm
Copy link
Contributor Author

@lunny then let's go with #26.
I'll close #15 and #27.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants