Description
Let's say I have the following package structure:
- a1
- types.go (Widget)
- sub1
- types.go (Fromble)
- a2
- types.go (Widget)
- sub2
- types.go (Fromble)
and types like
// a1
type Widget struct {
f sub1.Fromble
}
// a2
type Widget struct {
f sub2.Fromble
}
I'd like to be able to generate conversion functions for sub1/sub2. Then I'd like to generate conversion functions for a1/a2 and have them use the generated conversion functions from sub1/sub2. I haven't found a way to do this. I've trying using --extra-peer-dirs
, but all the generated files are currently using the default build tag (ignore_autogenerated
), and gengo purposefully excludes these files:
I could potentially use a unique tag per package & generator, but I have a real world example where some of the packages come from other repositories, and it's not easy to change their tags.
Is there a way to make this work with conversion-gen as-is, or will it require changes, either to conversion-gen or gengo?