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

Children under hidden parent revealed in help/usage print out #34

Closed
lyonlai opened this issue Jul 8, 2019 · 6 comments
Closed

Children under hidden parent revealed in help/usage print out #34

lyonlai opened this issue Jul 8, 2019 · 6 comments

Comments

@lyonlai
Copy link

lyonlai commented Jul 8, 2019

Problem

Children command under a hidden parent is hidden in the root usage print out but revealed in helped text one level above the hidden parent.

Gist to demo the problem

https://gist.github.com/lyonlai/9ba5a40861759612a20ee69d010e0976

Steps to reproduce

  1. compile the file.
  2. run ./main and you should see no database update commands
  3. run ./main database and you will see the intended to be hidden update commands shows up in the print out
@alecthomas
Copy link
Owner

I don't see an update command, maybe you're on an older version of Kong?

$ go run main.go
Usage: main <command>

Flags:
  --help     Show context-sensitive help.
  --debug    Enable debug mode.

Commands:
  database unused    get unused database

Run "main <command> --help" for more information on a command.

main: error: expected "database"

@alecthomas
Copy link
Owner

There was a fix in 4e98780 for something similar.

@lyonlai
Copy link
Author

lyonlai commented Jul 8, 2019

@alecthomas try to run go run main.go database, you will see the update command

@alecthomas
Copy link
Owner

$ go run main.go database
Usage: main database <command>

database related commands

Flags:
  --help     Show context-sensitive help.
  --debug    Enable debug mode.

Commands:
  database unused    get unused database

main: error: expected "unused"

@lyonlai
Copy link
Author

lyonlai commented Jul 8, 2019

I specified the kong version built with the main script and see the same as you do. I'll go and check the version we used. Thanks for looking into it.

@alecthomas
Copy link
Owner

👍

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

No branches or pull requests

2 participants