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

overflow issue in golang playground #76

Open
mwiede opened this issue Aug 16, 2019 · 0 comments
Open

overflow issue in golang playground #76

mwiede opened this issue Aug 16, 2019 · 0 comments

Comments

@mwiede
Copy link

mwiede commented Aug 16, 2019

I copied the direct validation example to the playground https://play.golang.org/p/ygjhVZg59cf
and I got the following error:

go: finding github.com/thedevsaddam/govalidator v1.9.8
go: downloading github.com/thedevsaddam/govalidator v1.9.8
go: extracting github.com/thedevsaddam/govalidator v1.9.8
# github.com/thedevsaddam/govalidator
../gopath075688560/pkg/mod/github.com/thedevsaddam/govalidator@v1.9.8/rules.go:899:7: constant -9223372036854775808 overflows int
../gopath075688560/pkg/mod/github.com/thedevsaddam/govalidator@v1.9.8/rules.go:908:7: constant 9223372036854775807 overflows int

I do not know whether it is a general problem or only inside of the playground, but changing from math.MinInt64 to math.MinInt32 and math.MaxInt64 to math.MaxInt32 solved it.

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

No branches or pull requests

1 participant