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

Fixes #5001 #5078

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Fix typo in RandomInt function name in misc.go
This commit corrects the function name from `Intn` to `IntN` in the RandomInt function, ensuring consistency with the updated import path for the math/rand package. This change enhances code clarity and correctness.

Signed-off-by: David VIEJO <dviejo@kungfusoftware.es>
  • Loading branch information
dviejokfs committed Dec 17, 2024
commit 367cf4fd1296c78f54203734871d9e52d3cf4d65
2 changes: 1 addition & 1 deletion gossip/util/misc.go
Original file line number Diff line number Diff line change
@@ -182,7 +182,7 @@ func SetVal(key string, val interface{}) {
// RandomInt returns, as an int, a non-negative pseudo-random integer in [0,n)
// It panics if n <= 0
func RandomInt(n int) int {
return r.Intn(n)
return r.IntN(n)
}

// RandomUInt64 returns a random uint64
Loading