Merge pull request #21607 from allencloud/change-validateNoSchema-to-validateNoScheme

change validateNoSchema to validateNoScheme
This commit is contained in:
Vincent Demeester 2016-03-31 10:14:23 +02:00
commit 4430d42db9
2 changed files with 2 additions and 2 deletions

View file

@ -206,7 +206,7 @@ func ValidateIndexName(val string) (string, error) {
return val, nil
}
func validateNoSchema(reposName string) error {
func validateNoScheme(reposName string) error {
if strings.Contains(reposName, "://") {
// It cannot contain a scheme!
return ErrInvalidRepositoryName

View file

@ -91,7 +91,7 @@ func splitReposSearchTerm(reposName string) (string, string) {
// Search queries the public registry for images matching the specified
// search terms, and returns the results.
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
}