diff --git a/cluster/defaults.go b/cluster/defaults.go index 4e1f159e..caef90cf 100644 --- a/cluster/defaults.go +++ b/cluster/defaults.go @@ -1116,7 +1116,7 @@ func (c *Cluster) setCloudProvider() error { return fmt.Errorf("failed to parse semver range for checking cloud provider %v", err) } if defaultExternalAwsRange(clusterVersion) { - return fmt.Errorf(fmt.Sprintf("Cloud provider %s is invalid for [%s]", aws.AWSCloudProviderName, c.Version)) + return fmt.Errorf("Cloud provider %s is invalid for [%s]", aws.AWSCloudProviderName, c.Version) } } } diff --git a/cluster/hosts.go b/cluster/hosts.go index a98bcd35..126a1e1c 100644 --- a/cluster/hosts.go +++ b/cluster/hosts.go @@ -89,7 +89,7 @@ func (c *Cluster) InvertIndexHosts() error { newHost.BastionHost = c.BastionHost } for _, role := range host.Role { - logrus.Debugf("Host: " + host.Address + " has role: " + role) + logrus.Debugf("Host: %s has role: %s", host.Address, role) switch role { case services.ETCDRole: newHost.IsEtcd = true diff --git a/cmd/up.go b/cmd/up.go index 731ee6d5..da9c188d 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -259,7 +259,7 @@ func ClusterUp(ctx context.Context, dialersOptions hosts.DialersOptions, flags c } if errMsgMaxUnavailableNotFailedCtrl != "" || errMsgMaxUnavailableNotFailedWrkr != "" { - return APIURL, caCrt, clientCert, clientKey, nil, fmt.Errorf(errMsgMaxUnavailableNotFailedCtrl + errMsgMaxUnavailableNotFailedWrkr) + return APIURL, caCrt, clientCert, clientKey, nil, fmt.Errorf("%s%s", errMsgMaxUnavailableNotFailedCtrl, errMsgMaxUnavailableNotFailedWrkr) } log.Infof(ctx, "Finished building Kubernetes cluster successfully") return APIURL, caCrt, clientCert, clientKey, kubeCluster.Certificates, nil diff --git a/util/ecr.go b/util/ecr.go index b02c48ee..ef84d314 100644 --- a/util/ecr.go +++ b/util/ecr.go @@ -36,7 +36,7 @@ func ECRCredentialPlugin(plugin *v3.ECRCredentialPlugin, pr string) (authConfig if len(matches) == 0 { return authConfig, fmt.Errorf("Not a valid ECR registry") } else if len(matches) < 3 { - return authConfig, fmt.Errorf(pr + "is not a valid repository URI for Amazon Elastic Container Registry.") + return authConfig, fmt.Errorf("%s is not a valid repository URI for Amazon Elastic Container Registry", pr) } config := &aws.Config{