Address new linter complaints

This commit is contained in:
Katrina Verey
2022-03-29 18:18:23 -04:00
parent b368b347d1
commit 14947e449b
77 changed files with 220 additions and 210 deletions

View File

@@ -96,8 +96,8 @@ type HelmChartArgs struct {
// per-chart params and global chart-independent parameters.
func SplitHelmParameters(
oldArgs []HelmChartArgs) (charts []HelmChart, globals HelmGlobals) {
for _, old := range oldArgs {
charts = append(charts, makeHelmChartFromHca(&old))
for i, old := range oldArgs {
charts = append(charts, makeHelmChartFromHca(&oldArgs[i]))
if old.HelmHome != "" {
// last non-empty wins
globals.ConfigHome = old.HelmHome

View File

@@ -192,14 +192,14 @@ func (k *Kustomization) FixKustomizationPostUnmarshalling() {
for i, g := range k.ConfigMapGenerator {
if g.EnvSource != "" {
k.ConfigMapGenerator[i].EnvSources =
append(g.EnvSources, g.EnvSource)
append(g.EnvSources, g.EnvSource) //nolint:gocritic
k.ConfigMapGenerator[i].EnvSource = ""
}
}
for i, g := range k.SecretGenerator {
if g.EnvSource != "" {
k.SecretGenerator[i].EnvSources =
append(g.EnvSources, g.EnvSource)
append(g.EnvSources, g.EnvSource) //nolint:gocritic
k.SecretGenerator[i].EnvSource = ""
}
}