Skip to content

Commit 2a93bd0

Browse files
ianlancetaylorgopherbot
authored andcommitted
doc/next: document that crypto/rand.Read never fails
For #66821 Change-Id: Id9b640a57b9d4d1f9114769f607480b14961e7b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/632036 Reviewed-by: Russ Cox <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent b6fed71 commit 2a93bd0

File tree

1 file changed

+7
-0
lines changed
  • doc/next/6-stdlib/99-minor/crypto/rand

1 file changed

+7
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The [Read] function, and the `Read` method of [Reader], are now
2+
defined to never fail.
3+
They will always return `nil` as the `error` result.
4+
If something somehow goes wrong while reading random numbers,
5+
the program will irrecoverably crash.
6+
This change was made because all supported systems now provide
7+
sources of random bytes that never fail.

0 commit comments

Comments
 (0)