mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-01 05:31:27 +02:00
Merge pull request #240 from zalando-incubator/feature/goreport-improvements
Some improvements for golint, ineffassign and misspell
This commit is contained in:
@@ -275,9 +275,9 @@ func (c *Cluster) tolerations(tolerationsSpec *[]v1.Toleration) []v1.Toleration
|
||||
Effect: v1.TaintEffect(podToleration["effect"]),
|
||||
},
|
||||
}
|
||||
} else {
|
||||
return []v1.Toleration{}
|
||||
}
|
||||
|
||||
return []v1.Toleration{}
|
||||
}
|
||||
|
||||
func (c *Cluster) generatePodTemplate(
|
||||
@@ -376,7 +376,7 @@ func (c *Cluster) generatePodTemplate(
|
||||
var names []string
|
||||
// handle environment variables from the PodEnvironmentConfigMap. We don't use envSource here as it is impossible
|
||||
// to track any changes to the object envSource points to. In order to emulate the envSource behavior, however, we
|
||||
// need to make sure that PodConfigMap variables doesn't override those we set explicitely from the configuration
|
||||
// need to make sure that PodConfigMap variables doesn't override those we set explicitly from the configuration
|
||||
// parameters
|
||||
envVarsMap := make(map[string]string)
|
||||
for _, envVar := range envVars {
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ func (c *Cluster) getDatabases() (map[string]string, error) {
|
||||
dbs[datname] = owner
|
||||
}
|
||||
|
||||
return dbs, nil
|
||||
return dbs, err
|
||||
}
|
||||
|
||||
// executeCreateDatabase creates new database with the given owner.
|
||||
|
||||
@@ -419,9 +419,8 @@ func (c *Cluster) deletePodDisruptionBudget() error {
|
||||
}
|
||||
if k8sutil.ResourceNotFound(err2) {
|
||||
return true, nil
|
||||
} else {
|
||||
return false, err2
|
||||
}
|
||||
return false, err2
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not delete pod disruption budget: %v", err)
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ type OAuthTokenGetter interface {
|
||||
getOAuthToken() (string, error)
|
||||
}
|
||||
|
||||
// OAuthTokenGetter enables fetching OAuth tokens by reading Kubernetes secrets
|
||||
// SecretOauthTokenGetter enables fetching OAuth tokens by reading Kubernetes secrets
|
||||
type SecretOauthTokenGetter struct {
|
||||
kubeClient *k8sutil.KubernetesClient
|
||||
OAuthTokenSecretName spec.NamespacedName
|
||||
|
||||
Reference in New Issue
Block a user