From 2a93bd0d79484281b9706e2d66a0b21b42da66de Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 26 Nov 2024 15:37:14 -0800 Subject: [PATCH] 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 Reviewed-by: Dmitri Shuralyov Auto-Submit: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- doc/next/6-stdlib/99-minor/crypto/rand/66821.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/next/6-stdlib/99-minor/crypto/rand/66821.md 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 index 0000000000..766e81e13a --- /dev/null +++ b/doc/next/6-stdlib/99-minor/crypto/rand/66821.md @@ -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. -- 2.48.1