From d66208108d06ce9d7154ca3d39eb8021f5e4e8f9 Mon Sep 17 00:00:00 2001 From: zhouhaibing089 Date: Sat, 14 Oct 2017 12:31:21 +0800 Subject: [PATCH] cmd/digest: import crypto algorithms the digest cli does not work if we do not import this two packages, tested in go1.9. basically, we have to make several algorithms to be available by calling crypto.RegisterHash in init functions. Signed-off-by: zhouhaibing089 --- cmd/digest/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/digest/main.go b/cmd/digest/main.go index 20f64ddb..308be461 100644 --- a/cmd/digest/main.go +++ b/cmd/digest/main.go @@ -9,6 +9,9 @@ import ( "github.com/docker/distribution/version" "github.com/opencontainers/go-digest" + + _ "crypto/sha256" + _ "crypto/sha512" ) var (