distribution/docs/handlers
Aaron Lehmann 58232e50cf 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
..
api_test.go Simplify digest.FromBytes calling convention 2015-12-14 14:30:51 -08:00
app.go Merge pull request #827 from aaronlehmann/read-only-mode-2 2015-10-15 11:50:31 -07:00
app_test.go Move initialization code from main.go to the registry package 2015-09-09 14:39:31 -07:00
basicauth.go Move registry package into handler package 2015-02-10 17:25:40 -08:00
basicauth_prego14.go Move registry package into handler package 2015-02-10 17:25:40 -08:00
blob.go Add an "enabled" parameter under "readonly", and make it as if the mutable handlers don't exist when read-only mode is enabled 2015-09-22 15:49:26 -07:00
blobupload.go Add an "enabled" parameter under "readonly", and make it as if the mutable handlers don't exist when read-only mode is enabled 2015-09-22 15:49:26 -07:00
catalog.go Create Repositories method 2015-07-21 21:45:14 -07:00
context.go Create Repositories method 2015-07-21 21:45:14 -07:00
health_test.go Move initialization code from main.go to the registry package 2015-09-09 14:39:31 -07:00
helpers.go Add an "enabled" parameter under "readonly", and make it as if the mutable handlers don't exist when read-only mode is enabled 2015-09-22 15:49:26 -07:00
hmac.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
hmac_test.go Refactor Blob Service API 2015-05-15 17:05:18 -07:00
hooks.go Feature: Web Panic Reporting via hooks 2015-05-31 14:21:22 +00:00
images.go Simplify digest.FromBytes calling convention 2015-12-14 14:30:51 -08:00
mail.go Feature: Web Panic Reporting via hooks 2015-05-31 14:21:22 +00:00
tags.go Allow Manifest Service to be configured with function arguments 2015-07-15 12:25:16 -07:00