1
0
mirror of https://github.com/rancher/rke.git synced 2025-05-04 06:16:48 +00:00

fix golint errors

This commit is contained in:
Krunal Hingu 2025-02-21 14:07:20 +05:30
parent 37ef1abcbf
commit 3509bfad9d
4 changed files with 4 additions and 4 deletions

View File

@ -1116,7 +1116,7 @@ func (c *Cluster) setCloudProvider() error {
return fmt.Errorf("failed to parse semver range for checking cloud provider %v", err) return fmt.Errorf("failed to parse semver range for checking cloud provider %v", err)
} }
if defaultExternalAwsRange(clusterVersion) { 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)
} }
} }
} }

View File

@ -89,7 +89,7 @@ func (c *Cluster) InvertIndexHosts() error {
newHost.BastionHost = c.BastionHost newHost.BastionHost = c.BastionHost
} }
for _, role := range host.Role { 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 { switch role {
case services.ETCDRole: case services.ETCDRole:
newHost.IsEtcd = true newHost.IsEtcd = true

View File

@ -259,7 +259,7 @@ func ClusterUp(ctx context.Context, dialersOptions hosts.DialersOptions, flags c
} }
if errMsgMaxUnavailableNotFailedCtrl != "" || errMsgMaxUnavailableNotFailedWrkr != "" { 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") log.Infof(ctx, "Finished building Kubernetes cluster successfully")
return APIURL, caCrt, clientCert, clientKey, kubeCluster.Certificates, nil return APIURL, caCrt, clientCert, clientKey, kubeCluster.Certificates, nil

View File

@ -36,7 +36,7 @@ func ECRCredentialPlugin(plugin *v3.ECRCredentialPlugin, pr string) (authConfig
if len(matches) == 0 { if len(matches) == 0 {
return authConfig, fmt.Errorf("Not a valid ECR registry") return authConfig, fmt.Errorf("Not a valid ECR registry")
} else if len(matches) < 3 { } 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{ config := &aws.Config{