Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
skonto committed Nov 1, 2024
1 parent 36762d1 commit 0bc5f1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions pkg/reconciler/labeler/accessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,19 @@ func updateRouteAnnotation(acc kmeta.Accessor, routeName string, diffAnn map[str
return
}
valSet.Delete(routeName)
sorted := valSet.UnsortedList()
sort.Strings(sorted)
diffAnn[serving.RoutesAnnotationKey] = strings.Join(sorted, ",")
routeNames := valSet.UnsortedList()
sort.Strings(routeNames)
diffAnn[serving.RoutesAnnotationKey] = strings.Join(routeNames, ",")

case !has && !remove:
if len(valSet) == 0 {
diffAnn[serving.RoutesAnnotationKey] = routeName
return
}
valSet.Insert(routeName)
sorted := valSet.UnsortedList()
sort.Strings(sorted)
diffAnn[serving.RoutesAnnotationKey] = strings.Join(sorted, ",")
routeNames := valSet.UnsortedList()
sort.Strings(routeNames)
diffAnn[serving.RoutesAnnotationKey] = strings.Join(routeNames, ",")
}
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/service/resources/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ func MakeConfigurationFromExisting(service *v1.Service, existing *v1.Configurati
routeName := names.Route(service)
set := labeler.GetListAnnValue(existing.Annotations, serving.RoutesAnnotationKey)
set.Insert(routeName)
sorted := set.UnsortedList()
sort.Strings(sorted)
anns[serving.RoutesAnnotationKey] = strings.Join(sorted, ",")
routeNames := set.UnsortedList()
sort.Strings(routeNames)
anns[serving.RoutesAnnotationKey] = strings.Join(routeNames, ",")

return &v1.Configuration{
ObjectMeta: metav1.ObjectMeta{
Expand Down

0 comments on commit 0bc5f1a

Please sign in to comment.