Skip to content

Commit

Permalink
doc/next: document that crypto/rand.Read never fails
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ianlancetaylor authored and gopherbot committed Nov 27, 2024
1 parent b6fed71 commit 2a93bd0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/next/6-stdlib/99-minor/crypto/rand/66821.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The [Read] function, and the `Read` method of [Reader], are now
defined to never fail.
They will always return `nil` as the `error` result.
If something somehow goes wrong while reading random numbers,
the program will irrecoverably crash.
This change was made because all supported systems now provide
sources of random bytes that never fail.

0 comments on commit 2a93bd0

Please sign in to comment.