-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Change cli arguments parser to kingpin, add short commands #51
Conversation
e6e5ec9
to
6f420db
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.
Since flags are changed, you'll need to update README.md as well
Nice job!
cmd/httplab/main.go
Outdated
cors bool | ||
config = kingpin.Flag("config", "Specifies custom config path.").Short('c').String() | ||
cors = kingpin.Flag("cors", "Enable CORS").Default("false").Bool() | ||
port = kingpin.Flag("port", "Specifies the port where HTTPLab will bind to.").Default("false").Default("10080").Int() |
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.
can u add .Short('p') here?
cmd/httplab/main.go
Outdated
config = kingpin.Flag("config", "Specifies custom config path.").Short('c').String() | ||
cors = kingpin.Flag("cors", "Enable CORS").Default("false").Bool() | ||
port = kingpin.Flag("port", "Specifies the port where HTTPLab will bind to.").Default("false").Default("10080").Int() | ||
bindings = kingpin.Flag("bindings", "Show keyboard bindings").Bool() |
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.
shouldn't we keep -h
for this one?
6f420db
to
e0fb9bd
Compare
@gchaincl Done! Please, take a look! |
@sponomarev thanks for this, but I'm closing this in favour of #50, it kept the original behavior which was to display the bindings information along the help. |
Closes #49