Skip to content

Commit

Permalink
refactor: use ReplaceAll()
Browse files Browse the repository at this point in the history
  • Loading branch information
piglei committed Jul 24, 2024
1 parent 16701bd commit 0855fd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion operator/pkg/controllers/bkapp/common/env_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func RenderAppVars(vars []corev1.EnvVar, context VarsRenderContext) []corev1.Env
return strings.HasSuffix(v.Name, suffix)
}) {
// TODO: Use other method to replace the variables when more variables are supported
newValue = strings.Replace(newValue, "{{bk_var_process_type}}", context.ProcessType, -1)
newValue = strings.ReplaceAll(newValue, "{{bk_var_process_type}}", context.ProcessType)
}

results[i] = corev1.EnvVar{Name: v.Name, Value: newValue}
Expand Down

0 comments on commit 0855fd2

Please sign in to comment.