From 32ed2d7df1a88c06865d628b6074fd85c9fa2575 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Tue, 19 May 2015 13:25:08 -0400 Subject: [PATCH] Fix typo: respository->repository Signed-off-by: Jordan Liggitt --- errors.go | 2 +- registry/api/v2/names.go | 6 +++--- registry/api/v2/names_test.go | 2 +- registry/storage/cache/memory.go | 2 +- registry/storage/cache/redis.go | 2 +- registry/storage/registry.go | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/errors.go b/errors.go index a4af23e57..53def4b8c 100644 --- a/errors.go +++ b/errors.go @@ -14,7 +14,7 @@ type ErrRepositoryUnknown struct { } func (err ErrRepositoryUnknown) Error() string { - return fmt.Sprintf("unknown respository name=%s", err.Name) + return fmt.Sprintf("unknown repository name=%s", err.Name) } // ErrRepositoryNameInvalid should be used to denote an invalid repository diff --git a/registry/api/v2/names.go b/registry/api/v2/names.go index e4a98861c..19cb72a02 100644 --- a/registry/api/v2/names.go +++ b/registry/api/v2/names.go @@ -46,7 +46,7 @@ var ( // ErrRepositoryNameComponentShort is returned when a repository name // contains a component which is shorter than // RepositoryNameComponentMinLength - ErrRepositoryNameComponentShort = fmt.Errorf("respository name component must be %v or more characters", RepositoryNameComponentMinLength) + ErrRepositoryNameComponentShort = fmt.Errorf("repository name component must be %v or more characters", RepositoryNameComponentMinLength) // ErrRepositoryNameMissingComponents is returned when a repository name // contains fewer than RepositoryNameMinComponents components @@ -61,7 +61,7 @@ var ( ErrRepositoryNameComponentInvalid = fmt.Errorf("repository name component must match %q", RepositoryNameComponentRegexp.String()) ) -// ValidateRespositoryName ensures the repository name is valid for use in the +// ValidateRepositoryName ensures the repository name is valid for use in the // registry. This function accepts a superset of what might be accepted by // docker core or docker hub. If the name does not pass validation, an error, // describing the conditions, is returned. @@ -75,7 +75,7 @@ var ( // // The result of the production, known as the "namespace", should be limited // to 255 characters. -func ValidateRespositoryName(name string) error { +func ValidateRepositoryName(name string) error { if len(name) > RepositoryNameTotalLengthMax { return ErrRepositoryNameLong } diff --git a/registry/api/v2/names_test.go b/registry/api/v2/names_test.go index de6a168f0..d1dd2b481 100644 --- a/registry/api/v2/names_test.go +++ b/registry/api/v2/names_test.go @@ -80,7 +80,7 @@ func TestRepositoryNameRegexp(t *testing.T) { t.Fail() } - if err := ValidateRespositoryName(testcase.input); err != testcase.err { + if err := ValidateRepositoryName(testcase.input); err != testcase.err { if testcase.err != nil { if err != nil { failf("unexpected error for invalid repository: got %v, expected %v", err, testcase.err) diff --git a/registry/storage/cache/memory.go b/registry/storage/cache/memory.go index 40ab0d941..125c11fbf 100644 --- a/registry/storage/cache/memory.go +++ b/registry/storage/cache/memory.go @@ -25,7 +25,7 @@ func NewInMemoryBlobDescriptorCacheProvider() BlobDescriptorCacheProvider { } func (imbdcp *inMemoryBlobDescriptorCacheProvider) RepositoryScoped(repo string) (distribution.BlobDescriptorService, error) { - if err := v2.ValidateRespositoryName(repo); err != nil { + if err := v2.ValidateRepositoryName(repo); err != nil { return nil, err } diff --git a/registry/storage/cache/redis.go b/registry/storage/cache/redis.go index c0e542bc5..1f3727f02 100644 --- a/registry/storage/cache/redis.go +++ b/registry/storage/cache/redis.go @@ -43,7 +43,7 @@ func NewRedisBlobDescriptorCacheProvider(pool *redis.Pool) BlobDescriptorCachePr // RepositoryScoped returns the scoped cache. func (rbds *redisBlobDescriptorService) RepositoryScoped(repo string) (distribution.BlobDescriptorService, error) { - if err := v2.ValidateRespositoryName(repo); err != nil { + if err := v2.ValidateRepositoryName(repo); err != nil { return nil, err } diff --git a/registry/storage/registry.go b/registry/storage/registry.go index 659c789e7..331aba73c 100644 --- a/registry/storage/registry.go +++ b/registry/storage/registry.go @@ -62,7 +62,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, name string) (distribution.Repository, error) { - if err := v2.ValidateRespositoryName(name); err != nil { + if err := v2.ValidateRepositoryName(name); err != nil { return nil, distribution.ErrRepositoryNameInvalid{ Name: name, Reason: err,