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
We were extracting some types that we use as attributes into their own package using Meta("struct:pkg:path", "types").
However, when we try to do so, the struct with the generated attribute generates code looking for the struct in the current package rather than the imported types.
…pkg:path`
What was the issue?
What was meant to be a check on the parentPkg to avoid recursive
definitions wasn't actually checking the parent package, but the package
of the field itself.
It was a bug that got introduced in goadesign#3022 and never worked as expected.
Solution:
Injecting the parent package for the initial definition seems to address
this.
What was the issue?
What was meant to be a check on the parentPkg to avoid recursive
definitions wasn't actually checking the parent package, but the package
of the field itself.
It was a bug that got introduced in #3022 and never worked as expected.
Solution:
Injecting the parent package for the initial definition seems to address
this.
We were extracting some types that we use as attributes into their own package using
Meta("struct:pkg:path", "types")
.However, when we try to do so, the struct with the generated attribute generates code looking for the struct in the current package rather than the imported
types
.Example:
We would expect generated code for
Bar
to be something like:However, it generates this instead:
The text was updated successfully, but these errors were encountered: