diff --git a/digest/digest.go b/digest/digest.go index dcf6bc910..a5d5b5a84 100644 --- a/digest/digest.go +++ b/digest/digest.go @@ -10,7 +10,6 @@ import ( "regexp" "strings" - "github.com/docker/distribution/common" "github.com/docker/docker/pkg/tarsum" ) @@ -105,7 +104,7 @@ func FromBytes(p []byte) (Digest, error) { func (d Digest) Validate() error { s := string(d) // Common case will be tarsum - _, err := common.ParseTarSum(s) + _, err := ParseTarSum(s) if err == nil { return nil } diff --git a/common/tarsum.go b/digest/tarsum.go similarity index 99% rename from common/tarsum.go rename to digest/tarsum.go index a1a56d6d8..6c32bc590 100644 --- a/common/tarsum.go +++ b/digest/tarsum.go @@ -1,4 +1,4 @@ -package common +package digest import ( "fmt" diff --git a/common/tarsum_test.go b/digest/tarsum_test.go similarity index 99% rename from common/tarsum_test.go rename to digest/tarsum_test.go index e860c9cdf..5a10b7468 100644 --- a/common/tarsum_test.go +++ b/digest/tarsum_test.go @@ -1,4 +1,4 @@ -package common +package digest import ( "reflect" diff --git a/storage/paths.go b/storage/paths.go index 9a61e0815..a19f2d702 100644 --- a/storage/paths.go +++ b/storage/paths.go @@ -5,7 +5,6 @@ import ( "path" "strings" - "github.com/docker/distribution/common" "github.com/docker/distribution/digest" ) @@ -189,7 +188,7 @@ func digestPathComoponents(dgst digest.Digest) ([]string, error) { hex, } - if tsi, err := common.ParseTarSum(dgst.String()); err == nil { + if tsi, err := digest.ParseTarSum(dgst.String()); err == nil { // We have a tarsum! version := tsi.Version if version == "" {