mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
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:
parent
213e7a8ab6
commit
c46165de19
@ -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 {
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user