Merge pull request #408 from gliptak/digester1
Point digest import to opencontainers/go-digest
This commit is contained in:
		| @@ -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) { | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"io" | ||||
| 	"os" | ||||
|  | ||||
| 	"github.com/docker/distribution/digest" | ||||
| 	"github.com/opencontainers/go-digest" | ||||
| 	"github.com/pkg/errors" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Stephen Day
					Stephen Day