Skip to content

Commit

Permalink
add registry.Repo("foo") (#1671)
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh authored May 1, 2023
1 parent 43710a9 commit 5438948
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/name/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package name
import (
"net"
"net/url"
"path"
"regexp"
"strings"
)
Expand Down Expand Up @@ -50,6 +51,11 @@ func (r Registry) String() string {
return r.Name()
}

// Repo returns a Repository in the Registry with the given name.
func (r Registry) Repo(repo ...string) Repository {
return Repository{Registry: r, repository: path.Join(repo...)}
}

// Scope returns the scope required to access the registry.
func (r Registry) Scope(string) string {
// The only resource under 'registry' is 'catalog'. http://goo.gl/N9cN9Z
Expand Down

0 comments on commit 5438948

Please sign in to comment.