]> Cypherpunks.ru repositories - gostls13.git/commitdiff
crypto/x509: add comment to blank imports done for init side effects
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 29 Oct 2020 20:47:12 +0000 (13:47 -0700)
committerEmmanuel Odeke <emmanuel@orijtech.com>
Thu, 29 Oct 2020 21:46:54 +0000 (21:46 +0000)
To educate future readers.

Change-Id: I1ef79178b6997cc96ca066c91b9fec822478674b
Reviewed-on: https://go-review.googlesource.com/c/go/+/266301
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Run-TryBot: Katie Hockman <katie@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>

src/crypto/x509/x509.go

index a314b5ed1ad4142cb58a70c6bff91656daada57a..537c207f38fd5847e1e930ee330228bc3c7fab1d 100644 (file)
@@ -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"