Update to provide small and clear interfaces
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
b72f1fd2e3
commit
582a0661bf
6 changed files with 26 additions and 18 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue