Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
navinag1989 committed Dec 14, 2023
1 parent ccf8073 commit 71979fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions codegen/cmd/injection-gen/generators/reconciler_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ func (g *reconcilerReconcilerGenerator) GenerateType(c *generator.Context, t *ty
}),
"setsNewString": c.Universe.Function(types.Name{
Package: "k8s.io/apimachinery/pkg/util/sets",
Name: "NewString",
Name: "New[string]",
}),
"setsString": c.Universe.Type(types.Name{
Package: "k8s.io/apimachinery/pkg/util/sets",
Name: "String",
Name: "Set[string]",
}),
"controllerOptions": c.Universe.Type(types.Name{
Package: "knative.dev/pkg/controller",
Expand Down Expand Up @@ -630,7 +630,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx {{.contextContext|raw}}, r
}
// Remove the finalizer.
existingFinalizers.Delete(r.finalizerName)
finalizers = existingFinalizers.List()
finalizers = sets.List(existingFinalizers)
}
mergePatch := map[string]interface{}{
Expand Down
2 changes: 1 addition & 1 deletion hash/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func ChooseSubset(from sets.Set[string], n int, target string) sets.Set[string]
// 2.1. While that index is already selected pick next index
// 3. Advance angle by `step`
// 4. Goto 1.
selection := sets.Set[int]{}
selection := sets.New[int]()
angle := hashData.start
hpl := len(hashData.hashPool)
for len(selection) < n {
Expand Down

0 comments on commit 71979fd

Please sign in to comment.