Skip to content
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

Help text broken when using an invalid flag #617

Closed
mvdan opened this issue Mar 13, 2017 · 3 comments
Closed

Help text broken when using an invalid flag #617

mvdan opened this issue Mar 13, 2017 · 3 comments
Labels
Milestone

Comments

@mvdan
Copy link
Contributor

mvdan commented Mar 13, 2017

 $ tyk --help
Tyk API Gateway.

        Usage:
                tyk [options]

        Options:
                -h --help                    Show this screen
                --conf=FILE                  Load a named configuration file
                --port=PORT                  Listen on PORT (overrides confg file)
                --memprofile                 Generate a memory profile
                --cpuprofile                 Generate a cpu profile
                --httpprofile                Expose runtime profiling data via HTTP
                --debug                      Enable Debug output
                --import-blueprint=<file>    Import an API Blueprint file
                --import-swagger=<file>      Import a Swagger file
                --create-api                 Creates a new API Definition from the blueprint
                --org-id=><id>               Assign the API Defintition to this org_id (required with create)
                --upstream-target=<url>      Set the upstream target for the definition
                --as-mock                    Creates the API as a mock based on example fields
                --for-api=<path>             Adds blueprint to existing API Defintition as version
                --as-version=<version>       The version number to use when inserting
                --log-instrumentation        Output instrumentation data to stdout

 $ tyk --foo
Usage:
                tyk [options]

The second execution should say something like invalid flag: --foo and print the whole help, or at least tell the user that they can do --help to get it.

Not high priority, but filing to remind myself.

@mvdan mvdan added the bug label Mar 13, 2017
@mvdan mvdan added this to the Release 2.4 milestone Mar 13, 2017
@mvdan mvdan self-assigned this Mar 13, 2017
@mvdan
Copy link
Contributor Author

mvdan commented Apr 4, 2017

Seems not to be our problem: docopt/docopt.go#37

docopt.go is also somewhat abandoned, with no commits for over a year. Let's look at this again in a few months. If it's still abandoned, switching to a better flag parsing library (read: non-buggy) might be a good option.

@mvdan mvdan removed their assignment Apr 4, 2017
@mvdan mvdan modified the milestones: Release 2.5, Release 2.4 Apr 4, 2017
@mvdan
Copy link
Contributor Author

mvdan commented Sep 13, 2017

Doesn't look good - another half year and the library is still dead, including that bug. We should definitely switch to another for 2.5.

@mvdan
Copy link
Contributor Author

mvdan commented Nov 2, 2017

@joshblakeley is replacing docopt with kingpin, so this will be fixed as part of that.

@mvdan mvdan closed this as completed Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant