Skip to content

Commit fe70a3a

Browse files
bradfitzodeke-em
authored andcommitted
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 <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]> Run-TryBot: Katie Hockman <[email protected]> Trust: Emmanuel Odeke <[email protected]>
1 parent 9a15966 commit fe70a3a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/crypto/x509/x509.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ import (
2828
"time"
2929
"unicode"
3030

31+
// Explicitly import these for their crypto.RegisterHash init side-effects.
32+
// Keep these as blank imports, even if they're imported above.
3133
_ "crypto/sha1"
3234
_ "crypto/sha256"
3335
_ "crypto/sha512"

0 commit comments

Comments
 (0)