Skip to content

Commit

Permalink
Switch DieReleaseUnstructured to return *unstructured.Unstructured (#65)
Browse files Browse the repository at this point in the history
`DieReleaseUnstructured` previously returned the interface
`runtime.Unstructured`, it now returns `*unstructured.Unstructured`
which is compatible with the previous interface, but also implements
`metav1.Object` in addition to `runtime.Object`.

Supporting both object interfaces is useful when working with
controller-runtime to avoid needing to cast the type.

Signed-off-by: Scott Andrews <[email protected]>
  • Loading branch information
scothis authored Aug 25, 2022
1 parent 7deb019 commit 04e5dfa
Show file tree
Hide file tree
Showing 23 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ type MyResourceDie interface {

// DieReleaseUnstructured returns the resource managed by the die as an
// unstructured object.
DieReleaseUnstructured() runtime.Unstructured
DieReleaseUnstructured() *unstructured.Unstructured

// MetadataDie stamps the resource's ObjectMeta field with a mutable die.
MetadataDie(fn func(d *diemetav1.ObjectMetaDie)) *MyResourceDie
Expand Down
4 changes: 2 additions & 2 deletions apis/admissionregistration/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/apiextensions/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/apiregistration/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apis/apiserver/flowcontrol/v1beta1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions apis/apps/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/authentication/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions apis/authorization/rbac/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions apis/authorization/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/autoscaling/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apis/batch/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/certificates/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/coordination/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions apis/core/v1/zz_generated.die.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 04e5dfa

Please sign in to comment.