distribution/registry/storage
Aaron Lehmann 31047c8113 Simplify digest.FromBytes calling convention
The current implementation of digest.FromBytes returns an error. This
error can never be non-nil, but its presence in the function signature
means each call site needs error handling code for an error that is
always nil.

I verified that none of the hash.Hash implementations in the standard
library can return an error on Write. Nor can any of the hash.Hash
implementations vendored in distribution.

This commit changes digest.FromBytes not to return an error. If Write
returns an error, it will panic, but as discussed above, this should
never happen.

This commit also avoids using a bytes.Reader to feed data into the hash
function in FromBytes. This makes the hypothetical case that would panic
a bit more explicit, and should also be more performant.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-14 14:30:51 -08:00
..
cache Validate digest length on parsing 2015-12-02 16:04:06 -08:00
driver Merge pull request #1187 from stevvooe/check-storage-drivers-list-path-not-found 2015-12-08 16:32:02 -08:00
blob_test.go Simplify digest.FromBytes calling convention 2015-12-14 14:30:51 -08:00
blobcachemetrics.go Open cache interface 2015-05-15 17:56:28 -07:00
blobserver.go Add a generic error type to capture non-typed errors 2015-11-03 11:19:44 -08:00
blobstore.go Simplify digest.FromBytes calling convention 2015-12-14 14:30:51 -08:00
blobwriter_nonresumable.go Remove digest package's dependency on external sha implementation 2015-05-20 23:44:08 -07:00
blobwriter_resumable.go registry/storage: close filereader after allocation 2015-11-02 11:55:11 -08:00
blobwriter.go registry/storage: close filereader after allocation 2015-11-02 11:55:11 -08:00
catalog_test.go Functional options for NewRegistryWithDriver 2015-08-19 11:06:30 -07:00
catalog.go Make the catalog more efficient 2015-12-07 12:33:01 -08:00
doc.go Move storage package under registry package 2015-02-11 12:43:04 -08:00
filereader_test.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
filereader.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
filewriter_test.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
filewriter.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
linkedblobstore.go Simplify digest.FromBytes calling convention 2015-12-14 14:30:51 -08:00
manifeststore_test.go Simplify digest.FromBytes calling convention 2015-12-14 14:30:51 -08:00
manifeststore.go Use well-known error type 2015-12-01 22:23:47 +01:00
paths_test.go Validate digest length on parsing 2015-12-02 16:04:06 -08:00
paths.go Remove pathMapper object 2015-08-17 18:51:05 -07:00
purgeuploads_test.go Remove pathMapper object 2015-08-17 18:51:05 -07:00
purgeuploads.go Remove pathMapper object 2015-08-17 18:51:05 -07:00
registry.go Redundant digest verification in validateBlob 2015-10-15 22:21:14 +08:00
revisionstore.go Move manifest package to schema1 2015-08-21 16:29:47 -07:00
signaturestore.go Remove pathMapper object 2015-08-17 18:51:05 -07:00
tagstore.go Remove pathMapper object 2015-08-17 18:51:05 -07:00
util.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
vacuum.go Remove pathMapper object 2015-08-17 18:51:05 -07:00
walk_test.go storage: add further tests for Walk implementation 2015-12-01 16:55:10 -08:00
walk.go storage: enforce sorted traversal during Walk 2015-12-01 16:25:30 -08:00