Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
saiskee committed Apr 1, 2024
1 parent dfcaae0 commit 7c30649
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/codegen/templates/sets/sets.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ func (s *{{ $kindLowerCamel }}MergedSet) Insert(
{{ $kindLowerCamel }}List ...*{{ $import_prefix }}.{{ $resource.Kind }},
) {
if s == nil {
panic("cannot insert into nil set")
}
if len(s.sets) == 0 {
s.sets = append(s.sets, makeGeneric{{ $resource.Kind }}Set({{ $kindLowerCamel }}List))
Expand Down
1 change: 1 addition & 0 deletions contrib/pkg/sets/sets.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type ResourceSet interface {
Delta(newSet ResourceSet) ResourceDelta
// Clone returns a deep copy of the set
Clone() ResourceSet
Merge(otherSet ResourceSet) ResourceSet
}

// ResourceDelta represents the set of changes between two ResourceSets.
Expand Down

0 comments on commit 7c30649

Please sign in to comment.