Skip to content

Commit f9890c6

Browse files
ianlancetaylorgopherbot
authored andcommitted
rand: deprecate in favor of math/rand/v2
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 <iant@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com>
1 parent e0ece0d commit f9890c6

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

rand/rand.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,11 @@
44

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

2014
import "sync"

0 commit comments

Comments
 (0)