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

Value's Type method makes it not a drop-in replacement #228

Open
alercah opened this issue Jan 6, 2020 · 2 comments · May be fixed by #239
Open

Value's Type method makes it not a drop-in replacement #228

alercah opened this issue Jan 6, 2020 · 2 comments · May be fixed by #239

Comments

@alercah
Copy link

alercah commented Jan 6, 2020

The Type method on Value means that you don't get drop-in replacement for the base flag package's equivalent.

It's not hard to wrap, but this should be called out as a specific incompatibility in the package header. Additionally, the Type method should be properly documented.

@stevenh
Copy link

stevenh commented Jan 19, 2020

This just caught me out too.
As the OP mentioned there's no documentation on Value.Type(), so no idea what its meant to return.

Would be better if this could be made optional so it is a drop in replacement.

CosmicToast pushed a commit to CosmicToast/pflag that referenced this issue Jan 28, 2020
@CosmicToast CosmicToast linked a pull request Jan 28, 2020 that will close this issue
@AdamSLevy
Copy link

Using reflect a default type string could easily be generated. The fact that implementing Type() string is forced on the user of this package is extremely annoying.

hoshsadiq pushed a commit to zulucmd/zflag that referenced this issue Feb 4, 2022
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

Successfully merging a pull request may close this issue.

3 participants