mirror of
https://github.com/rancher/os.git
synced 2025-09-02 07:15:41 +00:00
migrate to upstream libcompose in one and a half go
This commit is contained in:
11
vendor/github.com/docker/distribution/digest/digest.go
generated
vendored
11
vendor/github.com/docker/distribution/digest/digest.go
generated
vendored
@@ -70,15 +70,10 @@ func ParseDigest(s string) (Digest, error) {
|
||||
return d, d.Validate()
|
||||
}
|
||||
|
||||
// FromReader returns the most valid digest for the underlying content.
|
||||
// FromReader returns the most valid digest for the underlying content using
|
||||
// the canonical digest algorithm.
|
||||
func FromReader(rd io.Reader) (Digest, error) {
|
||||
digester := Canonical.New()
|
||||
|
||||
if _, err := io.Copy(digester.Hash(), rd); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return digester.Digest(), nil
|
||||
return Canonical.FromReader(rd)
|
||||
}
|
||||
|
||||
// FromTarArchive produces a tarsum digest from reader rd.
|
||||
|
Reference in New Issue
Block a user