mirror of
https://github.com/rancher/rke.git
synced 2025-04-27 19:25:44 +00:00
fix golint errors
This commit is contained in:
parent
37ef1abcbf
commit
3509bfad9d
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user