mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 13:33:50 +02:00
fix golangci-lint issues (#2715)
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com> Co-authored-by: fahed dorgaa <fahed.dorgaa.ext@corp.ovh.com> Co-authored-by: Matthias Adler <macedigital@users.noreply.github.com>
This commit is contained in:
co-authored by
fahed dorgaa
Matthias Adler
parent
25ccc87317
commit
aad03f71ea
@@ -668,7 +668,7 @@ func compareEnv(a, b []v1.EnvVar) bool {
|
||||
if len(a) != len(b) {
|
||||
return false
|
||||
}
|
||||
equal := true
|
||||
var equal bool
|
||||
for _, enva := range a {
|
||||
hasmatch := false
|
||||
for _, envb := range b {
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/zalando/postgres-operator/pkg/util/constants"
|
||||
)
|
||||
|
||||
//ExecCommand executes arbitrary command inside the pod
|
||||
// ExecCommand executes arbitrary command inside the pod
|
||||
func (c *Cluster) ExecCommand(podName *spec.NamespacedName, command ...string) (string, error) {
|
||||
c.setProcessName("executing command %q", strings.Join(command, " "))
|
||||
|
||||
@@ -59,7 +59,7 @@ func (c *Cluster) ExecCommand(podName *spec.NamespacedName, command ...string) (
|
||||
return "", fmt.Errorf("failed to init executor: %v", err)
|
||||
}
|
||||
|
||||
err = exec.Stream(remotecommand.StreamOptions{
|
||||
err = exec.StreamWithContext(context.TODO(), remotecommand.StreamOptions{
|
||||
Stdout: &execOut,
|
||||
Stderr: &execErr,
|
||||
Tty: false,
|
||||
|
||||
@@ -47,11 +47,6 @@ const (
|
||||
operatorPort = 8080
|
||||
)
|
||||
|
||||
type pgUser struct {
|
||||
Password string `json:"password"`
|
||||
Options []string `json:"options"`
|
||||
}
|
||||
|
||||
type patroniDCS struct {
|
||||
TTL uint32 `json:"ttl,omitempty"`
|
||||
LoopWait uint32 `json:"loop_wait,omitempty"`
|
||||
|
||||
@@ -449,10 +449,6 @@ func (c *Cluster) _waitPodLabelsReady(anyReplica bool) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Cluster) waitForAnyReplicaLabelReady() error {
|
||||
return c._waitPodLabelsReady(true)
|
||||
}
|
||||
|
||||
func (c *Cluster) waitForAllPodsLabelReady() error {
|
||||
return c._waitPodLabelsReady(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user