fmt.Errorf instead of errors.New

Upstream-commit: 283ebf3ff92ef552ae9cdf23a17c1a375dac99bd
Component: engine
This commit is contained in:
Sam Alba
2013-07-05 14:56:56 -07:00
parent fba3efb6e1
commit 76ecb3f5a4
+1 -1
View File
@@ -65,7 +65,7 @@ func ResolveRepositoryName(reposName string) (string, string, error) {
if len(nameParts) < 2 {
// There is a dot in repos name (and no registry address)
// Is it a Registry address without repos name?
return "", "", errors.New("Invalid repository name (ex: \"registry.domain.tld/myrepos\")")
return "", "", fmt.Errorf("Invalid repository name (ex: \"registry.domain.tld/myrepos\")")
}
hostname := nameParts[0]
reposName = nameParts[1]