ref(repo): remove punctuation from errors

pull/417/head
Michelle Noorali 9 years ago
parent d1285e80ef
commit cc7bbd6d6d

@ -101,12 +101,12 @@ func (r *repo) GetCredentialName() string {
func validateRepo(tr Repo, wantName, wantURL, wantCredentialName string, wantFormat RepoFormat, wantType RepoType) error { func validateRepo(tr Repo, wantName, wantURL, wantCredentialName string, wantFormat RepoFormat, wantType RepoType) error {
haveName := tr.GetName() haveName := tr.GetName()
if haveName != wantName { if haveName != wantName {
return fmt.Errorf("unexpected repo name; want: %s, have %s.", wantName, haveName) return fmt.Errorf("unexpected repo name; want: %s, have %s", wantName, haveName)
} }
haveURL := tr.GetURL() haveURL := tr.GetURL()
if haveURL != wantURL { if haveURL != wantURL {
return fmt.Errorf("unexpected repo url; want: %s, have %s.", wantURL, haveURL) return fmt.Errorf("unexpected repo url; want: %s, have %s", wantURL, haveURL)
} }
haveCredentialName := tr.GetCredentialName() haveCredentialName := tr.GetCredentialName()
@ -115,17 +115,17 @@ func validateRepo(tr Repo, wantName, wantURL, wantCredentialName string, wantFor
} }
if haveCredentialName != wantCredentialName { if haveCredentialName != wantCredentialName {
return fmt.Errorf("unexpected repo credential name; want: %s, have %s.", wantCredentialName, haveCredentialName) return fmt.Errorf("unexpected repo credential name; want: %s, have %s", wantCredentialName, haveCredentialName)
} }
haveFormat := tr.GetFormat() haveFormat := tr.GetFormat()
if haveFormat != wantFormat { if haveFormat != wantFormat {
return fmt.Errorf("unexpected repo format; want: %s, have %s.", wantFormat, haveFormat) return fmt.Errorf("unexpected repo format; want: %s, have %s", wantFormat, haveFormat)
} }
haveType := tr.GetType() haveType := tr.GetType()
if haveType != wantType { if haveType != wantType {
return fmt.Errorf("unexpected repo type; want: %s, have %s.", wantType, haveType) return fmt.Errorf("unexpected repo type; want: %s, have %s", wantType, haveType)
} }
return nil return nil

Loading…
Cancel
Save