We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
fakeuseragent.Random()
panic: runtime error: index out of range [-1] goroutine 102 [running]: math/rand.(*rngSource).Uint64(...) /opt/homebrew/Cellar/go/1.18.3/libexec/src/math/rand/rng.go:249 math/rand.(*rngSource).Int63(0xffffffffffffffff?) /opt/homebrew/Cellar/go/1.18.3/libexec/src/math/rand/rng.go:234 +0x90 math/rand.(*Rand).Int63(...) /opt/homebrew/Cellar/go/1.18.3/libexec/src/math/rand/rand.go:84 math/rand.(*Rand).Int31(...) /opt/homebrew/Cellar/go/1.18.3/libexec/src/math/rand/rand.go:98 math/rand.(*Rand).Int31n(0x140003b0060, 0xbb8) /opt/homebrew/Cellar/go/1.18.3/libexec/src/math/rand/rand.go:133 +0x50 math/rand.(*Rand).Intn(0x140016a7a18?, 0x14002236be0?) /opt/homebrew/Cellar/go/1.18.3/libexec/src/math/rand/rand.go:171 +0x34 github.com/EDDYCJY/fake-useragent/useragent.(*useragent).GetAllRandom(0x140016a7ab8?) /Users/ashishb/go/pkg/mod/github.com/!e!d!d!y!c!j!y/[email protected]/useragent/warehouse.go:50 +0x12c github.com/EDDYCJY/fake-useragent.(*browser).Random(...) /Users/ashishb/go/pkg/mod/github.com/!e!d!d!y!c!j!y/[email protected]/browser.go:61 github.com/EDDYCJY/fake-useragent.Random(...) ...
The text was updated successfully, but these errors were encountered:
I belive the race condition comes from https://github.com/eddycjy/fake-useragent/blob/master/useragent/warehouse.go#L39 being outside the lock
Sorry, something went wrong.
Same issue occurs at same position.
No branches or pull requests
The text was updated successfully, but these errors were encountered: