-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Urfave cli v2 #571
Urfave cli v2 #571
Conversation
lang/gapi.go
Outdated
Name: flagModulePath, | ||
Value: "", // empty by default | ||
Usage: "choose the modules path (absolute)", | ||
EnvVars: []string("MGMT_MODULE_PATH"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I bet you meant:
[]string{"MGMT_MODULE_PATH"},
You might also need to update something here: https://github.com/purpleidea/mgmt/blob/master/gapi/gapi.go#L104 |
06dbf3d
to
96b1886
Compare
@@ -41,207 +41,207 @@ func CLI(program, version string, flags Flags) error { | |||
} | |||
|
|||
// All of these flags can be accessed in your GAPI implementation with | |||
// the `c.Parent().Type` and `c.Parent().IsSet` functions. Their own | |||
// the `c.Lineage()[1].Type` and `c.Lineage()[1].IsSet` functions. Their own |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's especially dope when you also port the comments. I do this too. Not being sarcastic. 👍
96b1886
to
34068b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one small issue, but otherwise looks perfect!
Could you also change the two commit prefixes:
Eg: first should be: lib:
not lang, and the other should be examples: lib:
Thanks!
lang/gapi.go
Outdated
// Name: "stdin", | ||
// Usage: "use passthrough stdin", | ||
//}, | ||
modulePath, | ||
&modulePath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I think you want the & up higher in the modulePath definition.
eg: modulePath := cli.StringFlag{
becomes:
modulePath := &cli.StringFlag{
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. Yes, this is silly. It was one of the first places I touched and had not yet grokked this.
34068b6
to
33d89c2
Compare
LGTM =D ... Waiting for travis. PS: Did you smoke test to see if the nested GAPI stuff works? |
Merged, thanks! |
No description provided.