From fe70a3a0fd31441bcbb9932ecab11a6083cf2119 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 29 Oct 2020 13:47:12 -0700 Subject: [PATCH] crypto/x509: add comment to blank imports done for init side effects To educate future readers. Change-Id: I1ef79178b6997cc96ca066c91b9fec822478674b Reviewed-on: https://go-review.googlesource.com/c/go/+/266301 Reviewed-by: Katie Hockman Reviewed-by: Emmanuel Odeke Run-TryBot: Katie Hockman Trust: Emmanuel Odeke --- src/crypto/x509/x509.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crypto/x509/x509.go b/src/crypto/x509/x509.go index a314b5ed1a..537c207f38 100644 --- a/src/crypto/x509/x509.go +++ b/src/crypto/x509/x509.go @@ -28,6 +28,8 @@ import ( "time" "unicode" + // Explicitly import these for their crypto.RegisterHash init side-effects. + // Keep these as blank imports, even if they're imported above. _ "crypto/sha1" _ "crypto/sha256" _ "crypto/sha512" -- 2.48.1