Skip to content

Commit

Permalink
fixing linter
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroEsc committed Apr 2, 2024
1 parent ca0dac1 commit 12c5810
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -945,11 +945,13 @@ func validateHelmReleaseReplicaCount(rp *v1alpha1.Redpanda, hr *helmv2beta2.Helm
// If quorum may be preserved, then find out about topic replication and ensure we do not go below default
specConfigs := clusterSpec.Config
doCheckDefMinTopicReplicas := true
// nolint:nestif // complexity is ok
if clusterSpec.Config != nil {
clusterInfo := specConfigs.Cluster
if clusterInfo != nil {
clusterMap := make(map[string]string)
errUnmar := json.Unmarshal(clusterInfo.Raw, clusterMap)
ClusterMapPtr := &clusterMap
errUnmar := json.Unmarshal(clusterInfo.Raw, ClusterMapPtr)
if errUnmar != nil {
return fmt.Errorf("cannot unmarshal cluster config data %w", errUnmar)
}
Expand All @@ -964,7 +966,7 @@ func validateHelmReleaseReplicaCount(rp *v1alpha1.Redpanda, hr *helmv2beta2.Helm

if requestedReplicas < minReplicationFactorInt {
// nolint:goerr113 // error is not wrapping existing error
return fmt.Errorf("requested replicas of %d is less than replication factor %s", requestedReplicas, minReplicationFactorInt)
return fmt.Errorf("requested replicas of %d is less than replication factor %d", requestedReplicas, minReplicationFactorInt)
}
}
}
Expand Down

0 comments on commit 12c5810

Please sign in to comment.