forked from TrueCloudLab/distribution
1.change validateNoSchema into validateNoScheme
2.change schema into scheme in docs and some annotations. Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
8562b657c8
commit
53a8806b40
2 changed files with 2 additions and 2 deletions
|
@ -206,7 +206,7 @@ func ValidateIndexName(val string) (string, error) {
|
||||||
return val, nil
|
return val, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateNoSchema(reposName string) error {
|
func validateNoScheme(reposName string) error {
|
||||||
if strings.Contains(reposName, "://") {
|
if strings.Contains(reposName, "://") {
|
||||||
// It cannot contain a scheme!
|
// It cannot contain a scheme!
|
||||||
return ErrInvalidRepositoryName
|
return ErrInvalidRepositoryName
|
||||||
|
|
|
@ -91,7 +91,7 @@ func splitReposSearchTerm(reposName string) (string, string) {
|
||||||
// Search queries the public registry for images matching the specified
|
// Search queries the public registry for images matching the specified
|
||||||
// search terms, and returns the results.
|
// search terms, and returns the results.
|
||||||
func (s *Service) Search(term string, authConfig *types.AuthConfig, userAgent string, headers map[string][]string) (*registrytypes.SearchResults, error) {
|
func (s *Service) Search(term string, authConfig *types.AuthConfig, userAgent string, headers map[string][]string) (*registrytypes.SearchResults, error) {
|
||||||
if err := validateNoSchema(term); err != nil {
|
if err := validateNoScheme(term); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue