Skip to content

Commit

Permalink
Unify the terms used
Browse files Browse the repository at this point in the history
  • Loading branch information
toVersus committed Sep 6, 2019
1 parent 56a0178 commit 90b7c31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/serving/config_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ var UserImageAnnotationKey = "client.knative.dev/user-image"

// UpdateEnvVars gives the configuration all the env var values listed in the given map of
// vars. Does not touch any environment variables not mentioned, but it can add
// new env vars and change the values of existing ones, then sort by environment key name.
// new env vars and change the values of existing ones, then sort by env key name.
func UpdateEnvVars(template *servingv1alpha1.RevisionTemplateSpec, toUpdate map[string]string, toRemove []string) error {
container, err := ContainerOfRevisionTemplate(template)
if err != nil {
return err
}
updated := updateEnvVars(container.Env, toUpdate)
removed := removeEnvVars(updated, toRemove)
// Sort by Env key name
// Sort by env key name
sort.SliceStable(removed, func(i, j int) bool {
return removed[i].Name < removed[j].Name
})
Expand Down

0 comments on commit 90b7c31

Please sign in to comment.