my code
var require bool
cmd.Flags().BoolVarP(&require, "require", "r", true,
"default: true.")
If default value is "true", weather I add "-r" or not, "require" is always "true". But if default value is "false", it works well.
Please help, Thanks!
false
, I do not need to use=true
. And in java, bose case works well. – Parma