Update repo normalize error message to include the name of the repo.

Signed-off-by: Chuanying Du <cydu@google.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Chuanying Du 2020-10-04 18:17:37 -07:00 committed by Sebastiaan van Stijn
parent b979f00692
commit a97eb69556
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

View File

@ -17,7 +17,6 @@
package docker
import (
"errors"
"fmt"
"strings"
@ -57,7 +56,7 @@ func ParseNormalizedNamed(s string) (Named, error) {
remoteName = remainder
}
if strings.ToLower(remoteName) != remoteName {
return nil, errors.New("invalid reference format: repository name must be lowercase")
return nil, fmt.Errorf("invalid reference format: repository name (%s) must be lowercase", remoteName)
}
ref, err := Parse(domain + "/" + remainder)