hi, guys, there is a bug when parsing input unit value larger than 255.
here is a example to reproduce the bug.
package main
import (
"github.com/AlecAivazis/survey/v2"
)
func main() {
var max uint
if err := survey.AskOne(&survey.Input{
Message: "Which is the unit value?",
}, &max); err != nil {
panic(err)
}
print(max)
}
And we should set bitSize to 0 when calling parseUint, which means let the operating system determine the appropriate bitSize.
hi, guys, there is a bug when parsing input unit value larger than 255.
here is a example to reproduce the bug.
And we should set
bitSize
to 0 when callingparseUint
, which means let the operating system determine the appropriatebitSize
.