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
how to set nil
as default value in BoolVar
?
#2142
Comments
OpenWaygate
changed the title
how to set
how to set May 5, 2024
nil
as default value?nil
as default value in BoolVar
?
In Go a bool cannot be nil but only true or false. If you’re thinking of the pointer you’re passing in, that cannot be nil as it must represent a location where cobra can write true or false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to keep a variable as nil except explicitly set, but only
true
orfalse
is allowed.The text was updated successfully, but these errors were encountered: