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:
allencloud 2016-03-29 14:36:38 +08:00
parent 8562b657c8
commit 53a8806b40
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
}