Merge pull request #408 from gliptak/digester1
Point digest import to opencontainers/go-digest
This commit is contained in:
		
						commit
						e974c8678d
					
				
					 4 changed files with 6 additions and 6 deletions
				
			
		|  | @ -8,8 +8,8 @@ import ( | ||||||
| 	"sync" | 	"sync" | ||||||
| 
 | 
 | ||||||
| 	"github.com/docker/containerd/log" | 	"github.com/docker/containerd/log" | ||||||
| 	"github.com/docker/distribution/digest" |  | ||||||
| 	"github.com/nightlyone/lockfile" | 	"github.com/nightlyone/lockfile" | ||||||
|  | 	"github.com/opencontainers/go-digest" | ||||||
| 	"github.com/pkg/errors" | 	"github.com/pkg/errors" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  | @ -191,7 +191,7 @@ func (cs *ContentStore) Begin(ref string) (*ContentWriter, error) { | ||||||
| 		fp:       fp, | 		fp:       fp, | ||||||
| 		lock:     lock, | 		lock:     lock, | ||||||
| 		path:     path, | 		path:     path, | ||||||
| 		digester: digest.Canonical.New(), | 		digester: digest.Canonical.Digester(), | ||||||
| 	}, nil | 	}, nil | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -205,7 +205,7 @@ func (cs *ContentStore) Resume(ref string) (*ContentWriter, error) { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	digester := digest.Canonical.New() | 	digester := digest.Canonical.Digester() | ||||||
| 
 | 
 | ||||||
| 	// slow slow slow!!, send to goroutine or use resumable hashes | 	// slow slow slow!!, send to goroutine or use resumable hashes | ||||||
| 	fp, err := os.Open(data) | 	fp, err := os.Open(data) | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ import ( | ||||||
| 	"runtime" | 	"runtime" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/docker/distribution/digest" | 	"github.com/opencontainers/go-digest" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestContentWriter(t *testing.T) { | func TestContentWriter(t *testing.T) { | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ import ( | ||||||
| 	"io" | 	"io" | ||||||
| 	"os" | 	"os" | ||||||
| 
 | 
 | ||||||
| 	"github.com/docker/distribution/digest" | 	"github.com/opencontainers/go-digest" | ||||||
| 	"github.com/pkg/errors" | 	"github.com/pkg/errors" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -5,8 +5,8 @@ import ( | ||||||
| 	"os" | 	"os" | ||||||
| 	"path/filepath" | 	"path/filepath" | ||||||
| 
 | 
 | ||||||
| 	"github.com/docker/distribution/digest" |  | ||||||
| 	"github.com/nightlyone/lockfile" | 	"github.com/nightlyone/lockfile" | ||||||
|  | 	"github.com/opencontainers/go-digest" | ||||||
| 	"github.com/pkg/errors" | 	"github.com/pkg/errors" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue