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

Add hidden flags #181

Closed
wants to merge 1 commit into from
Closed

Add hidden flags #181

wants to merge 1 commit into from

Conversation

hatchan
Copy link

@hatchan hatchan commented Feb 12, 2015

This is similar to #180, but then applied to flags. Implementation is done similar to #155

@termie
Copy link

termie commented Feb 12, 2015

This feature is definitely a help to us for shipping products where some features are unlikely to be used by the end user (but we use them internally), ideally there would be a help all added after this lands that would allow displaying those flags as well

@psmit
Copy link
Contributor

psmit commented Feb 18, 2015

👍

@jszwedko
Copy link
Contributor

I understand the motivation for a feature like this, but this could also be accomplished by checking for an environment variable and conditionally adding flags in the source (e.g. looking for INTERNAL_FLAGS=1).

@termie
Copy link

termie commented Feb 20, 2015

@jszwedko perhaps this is not how you design your applications, but I would assume for most the app.Run() is their first entry point, to establish the environment within which the application will execute, creating a separate pre-run step that also establishes the environment seems like duplication of effort

@jszwedko
Copy link
Contributor

@termie sure, but it doesn't need to be. The main entry point is always main and I don't think it is improper to vary the commands, flags, etc. that are allowed based on the environment the application is running under. Every feature adds cost to the library, so I'm just trying to consider the alternatives.

@harshavardhana
Copy link
Contributor

Oh wow, i should have seen this PR before i just submitted - #201 .. damn! , how quickly will this be merged?

@harshavardhana
Copy link
Contributor

Improved upon #201 with filtering flags at higher level than 'templates' so that we don't end up with odd formatting issues. This way we don't also have to keep IsHidden() or IsNotHidden() exported functions. Please review..

Also by default --generate-bash-completion flag is never printed along with help.

@ravigadde
Copy link

+1

@meatballhat meatballhat self-assigned this May 1, 2016
@meatballhat meatballhat added the kind/feature describes a code enhancement / feature request label May 1, 2016
@codegangsta codegangsta added the status/claimed someone has claimed this issue label May 1, 2016
@codegangsta codegangsta removed the status/claimed someone has claimed this issue label May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature describes a code enhancement / feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants