Update to provide small and clear interfaces

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan
2015-09-08 16:00:48 -07:00
parent f8c09b6a7d
commit 31a448a628
13 changed files with 901 additions and 648 deletions

View File

@@ -108,7 +108,7 @@ func (reg *registry) Scope() distribution.Scope {
// Instances should not be shared between goroutines but are cheap to
// allocate. In general, they should be request scoped.
func (reg *registry) Repository(ctx context.Context, canonicalName string) (distribution.Repository, error) {
if _, err := reference.NewRepository(canonicalName); err != nil {
if _, err := reference.ParseNamed(canonicalName); err != nil {
return nil, distribution.ErrRepositoryNameInvalid{
Name: canonicalName,
Reason: err,