From d8aee18f6c872a976ac5706a3003e938c7fd32b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Lipt=C3=A1k?= Date: Mon, 9 Jan 2017 18:10:52 -0500 Subject: [PATCH] Point digest import to opencontainers/go-digest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gábor Lipták --- content/content.go | 6 +++--- content/content_test.go | 2 +- content/helpers.go | 2 +- content/writer.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/content.go b/content/content.go index d6298c4..c4318b3 100644 --- a/content/content.go +++ b/content/content.go @@ -8,8 +8,8 @@ import ( "sync" "github.com/docker/containerd/log" - "github.com/docker/distribution/digest" "github.com/nightlyone/lockfile" + "github.com/opencontainers/go-digest" "github.com/pkg/errors" ) @@ -191,7 +191,7 @@ func (cs *ContentStore) Begin(ref string) (*ContentWriter, error) { fp: fp, lock: lock, path: path, - digester: digest.Canonical.New(), + digester: digest.Canonical.Digester(), }, nil } @@ -205,7 +205,7 @@ func (cs *ContentStore) Resume(ref string) (*ContentWriter, error) { return nil, err } - digester := digest.Canonical.New() + digester := digest.Canonical.Digester() // slow slow slow!!, send to goroutine or use resumable hashes fp, err := os.Open(data) diff --git a/content/content_test.go b/content/content_test.go index 1f2fb80..7afc4c4 100644 --- a/content/content_test.go +++ b/content/content_test.go @@ -15,7 +15,7 @@ import ( "runtime" "testing" - "github.com/docker/distribution/digest" + "github.com/opencontainers/go-digest" ) func TestContentWriter(t *testing.T) { diff --git a/content/helpers.go b/content/helpers.go index 65f13e7..a4e76c6 100644 --- a/content/helpers.go +++ b/content/helpers.go @@ -4,7 +4,7 @@ import ( "io" "os" - "github.com/docker/distribution/digest" + "github.com/opencontainers/go-digest" "github.com/pkg/errors" ) diff --git a/content/writer.go b/content/writer.go index 4c6a1cc..3a36636 100644 --- a/content/writer.go +++ b/content/writer.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" - "github.com/docker/distribution/digest" "github.com/nightlyone/lockfile" + "github.com/opencontainers/go-digest" "github.com/pkg/errors" )