Permalink
Browse files

Point digest import to opencontainers/go-digest

Signed-off-by: Gábor Lipták <gliptak@gmail.com>
  • Loading branch information...
1 parent 017d4b7 commit d8aee18f6c872a976ac5706a3003e938c7fd32b1 @gliptak gliptak committed Jan 9, 2017
Showing with 6 additions and 6 deletions.
  1. +3 −3 content/content.go
  2. +1 −1 content/content_test.go
  3. +1 −1 content/helpers.go
  4. +1 −1 content/writer.go
View
@@ -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)
@@ -15,7 +15,7 @@ import (
"runtime"
"testing"
- "github.com/docker/distribution/digest"
+ "github.com/opencontainers/go-digest"
)
func TestContentWriter(t *testing.T) {
View
@@ -4,7 +4,7 @@ import (
"io"
"os"
- "github.com/docker/distribution/digest"
+ "github.com/opencontainers/go-digest"
"github.com/pkg/errors"
)
View
@@ -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"
)

0 comments on commit d8aee18

Please sign in to comment.