Extra newlines in error output

StandardErrorMessage does not have a newline by default, other
error messages should not end with a newline.
This commit is contained in:
Clayton Coleman 2015-08-09 11:41:52 -04:00
parent 213e7a8ab6
commit c46165de19
2 changed files with 2 additions and 2 deletions

View File

@ -188,7 +188,7 @@ func NegotiateVersion(client *Client, c *Config, version string, clientRegistere
}
apiVersions, err := client.ServerAPIVersions()
if err != nil {
return "", fmt.Errorf("couldn't read version from server: %v\n", err)
return "", fmt.Errorf("couldn't read version from server: %v", err)
}
serverVersions := util.StringSet{}
for _, v := range apiVersions.Versions {

View File

@ -93,7 +93,7 @@ func checkErr(err error, handleErr func(string)) {
msg, ok := StandardErrorMessage(err)
if !ok {
msg = fmt.Sprintf("error: %s\n", err.Error())
msg = fmt.Sprintf("error: %s", err.Error())
}
handleErr(msg)
}