From: Brad Fitzpatrick Date: Thu, 29 Oct 2020 20:47:12 +0000 (-0700) Subject: crypto/x509: add comment to blank imports done for init side effects X-Git-Tag: go1.16beta1~408 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fe70a3a0fd31441bcbb9932ecab11a6083cf2119;p=gostls13.git 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 --- 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"