Golangci-lint update (nilerr linter)
internal/controller/postgrescluster/patroni.go:274:4: error is nil but it returns error (nilerr)
return custom, err
^
internal/controller/postgrescluster/patroni.go:334:3: error is nil but it returns error (nilerr)
return intent, err
@@ -270,11 +270,8 @@ func (r *Reconciler) reconcileReplicationSecret(
}}
err := errors.WithStack(r.Client.Get(ctx,
client.ObjectKeyFromObject(custom), custom))
- if err == nil {
return custom, err
}
- return nil, err
- }
existing := &corev1.Secret{ObjectMeta: naming.ReplicationClientCertSecret(cluster)}
err := errors.WithStack(client.IgnoreNotFound(
@@ -330,11 +327,8 @@ func (r *Reconciler) reconcileReplicationSecret(
if err == nil {
err = errors.WithStack(r.apply(ctx, intent))
}
- if err == nil {
return intent, err
}
- return nil, err
-}
// replicationCertSecretProjection returns a secret projection of the postgrescluster's
// client certificate and key to include in the instance configuration volume.
