forked from TrueCloudLab/distribution
Merge pull request #21607 from allencloud/change-validateNoSchema-to-validateNoScheme
change validateNoSchema to validateNoScheme
This commit is contained in:
commit
4430d42db9
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue