You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The array append operation can be performed consecutively,Make code cleaner。
for_, ts:=rangejob.Spec.Tasks {
// TODO(k82cn): The splitter and the prefix of env should be configurable.formateENVKey:=strings.Replace(ts.Name, "-", "_", -1)
envNames=append(envNames, fmt.Sprintf(EnvTaskHostFmt, strings.ToUpper(formateENVKey)))
envNames=append(envNames, fmt.Sprintf(EnvHostNumFmt, strings.ToUpper(formateENVKey)))
}
Describe the solution you'd like
It should be so
for_, ts:=rangejob.Spec.Tasks {
// TODO(k82cn): The splitter and the prefix of env should be configurable.formateENVKey:=strings.Replace(ts.Name, "-", "_", -1)
envNames=append(envNames, fmt.Sprintf(EnvTaskHostFmt, strings.ToUpper(formateENVKey)),fmt.Sprintf(EnvHostNumFmt, strings.ToUpper(formateENVKey)))
}
Additional context
No response
The text was updated successfully, but these errors were encountered:
What is the problem you're trying to solve
The array append operation can be performed consecutively,Make code cleaner。
Describe the solution you'd like
It should be so
Additional context
No response
The text was updated successfully, but these errors were encountered: