]> Cypherpunks repositories - gostls13.git/commitdiff
doc/next: document that crypto/rand.Read never fails
authorIan Lance Taylor <iant@golang.org>
Tue, 26 Nov 2024 23:37:14 +0000 (15:37 -0800)
committerGopher Robot <gobot@golang.org>
Wed, 27 Nov 2024 21:44:26 +0000 (21:44 +0000)
For #66821

Change-Id: Id9b640a57b9d4d1f9114769f607480b14961e7b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/632036
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

doc/next/6-stdlib/99-minor/crypto/rand/66821.md [new file with mode: 0644]

diff --git a/doc/next/6-stdlib/99-minor/crypto/rand/66821.md b/doc/next/6-stdlib/99-minor/crypto/rand/66821.md
new file mode 100644 (file)
index 0000000..766e81e
--- /dev/null
@@ -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.