Skip to content

Commit 5438948

Browse files
authored
add registry.Repo("foo") (#1671)
1 parent 43710a9 commit 5438948

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/name/registry.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package name
1717
import (
1818
"net"
1919
"net/url"
20+
"path"
2021
"regexp"
2122
"strings"
2223
)
@@ -50,6 +51,11 @@ func (r Registry) String() string {
5051
return r.Name()
5152
}
5253

54+
// Repo returns a Repository in the Registry with the given name.
55+
func (r Registry) Repo(repo ...string) Repository {
56+
return Repository{Registry: r, repository: path.Join(repo...)}
57+
}
58+
5359
// Scope returns the scope required to access the registry.
5460
func (r Registry) Scope(string) string {
5561
// The only resource under 'registry' is 'catalog'. http://goo.gl/N9cN9Z

0 commit comments

Comments
 (0)