Skip to content

Commit

Permalink
rand: deprecate in favor of math/rand/v2
Browse files Browse the repository at this point in the history
For golang/go#61716
Fixes golang/go#71373

Change-Id: I478f963fc6ecd7de540e288ffa5f4f6dd87219d7
Reviewed-on: https://go-review.googlesource.com/c/exp/+/644475
Reviewed-by: Ian Lance Taylor <[email protected]>
Commit-Queue: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
  • Loading branch information
ianlancetaylor authored and gopherbot committed Feb 7, 2025
1 parent e0ece0d commit f9890c6
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions rand/rand.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@

// Package rand implements pseudo-random number generators.
//
// Random numbers are generated by a Source. Top-level functions, such as
// Float64 and Int, use a default shared Source that produces a deterministic
// sequence of values each time a program is run. Use the Seed function to
// initialize the default Source if different behavior is required for each run.
// The default Source, a LockedSource, is safe for concurrent use by multiple
// goroutines, but Sources created by NewSource are not. However, Sources are small
// and it is reasonable to have a separate Source for each goroutine, seeded
// differently, to avoid locking.
//
// For random numbers suitable for security-sensitive work, see the crypto/rand
// package.
//
// Deprecated: use the math/rand/v2 package instead. This package is
// scheduled to be tagged and deleted, per https://go.dev/issue/61716.
package rand

import "sync"
Expand Down

0 comments on commit f9890c6

Please sign in to comment.