You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before generation was used for claim / class / managed resource methods, we made sure that methods were implemented such that each struct satisfied its desired interface. For example:
var_ resource.Claim=&RedisCluster{}
How could Crossplane help solve your problem?
Though these type checks are less important now that the methods are generated, they are helpful for someone who is trying to understand how these types are used in crossplane-runtime. It would be useful to generate these type checks alongside the methods.
The text was updated successfully, but these errors were encountered:
Implementation wise I think it might be possible to do this using a generate.WriteOption. Something like:
err:=generate.WriteMethods(p, methods, filepath.Join(filepath.Dir(p.GoFiles[0]), filename),
generate.Satisfies(i), // i is however we choose to represent an interface here.generate.WithHeaders(header),
generate.WithImportAliases(map[string]string{RuntimeImport: RuntimeAlias}),
generate.WithMatcher(match.AllOf(
match.Class(),
match.DoesNotHaveMarker(comments.In(p), DisableMarker, "false")),
),
)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What problem are you facing?
Before generation was used for claim / class / managed resource methods, we made sure that methods were implemented such that each struct satisfied its desired interface. For example:
How could Crossplane help solve your problem?
Though these type checks are less important now that the methods are generated, they are helpful for someone who is trying to understand how these types are used in
crossplane-runtime
. It would be useful to generate these type checks alongside the methods.The text was updated successfully, but these errors were encountered: