The generated templates, templateB.html.go and templateA.html.go will both have the MyPartial type declaration, which will cause the MyPartial redeclared in this block golang error.
One potential solution to this issue would be to add a new syntax dedicated to type declarations. The types declared using this new syntax would only be output once.
Let me know if there's an alternative way to accomplish this that I'm missing. I'm also willing to submit a PR if fixing this issue is non-trivial to accomplish. Thank you very much!
I'd like to be able to declare types in my partial files.
partial.html
templateA.html
templateB.html
The generated templates, templateB.html.go and templateA.html.go will both have the
MyPartial
type declaration, which will cause theMyPartial redeclared in this block
golang error.One potential solution to this issue would be to add a new syntax dedicated to type declarations. The types declared using this new syntax would only be output once.
Let me know if there's an alternative way to accomplish this that I'm missing. I'm also willing to submit a PR if fixing this issue is non-trivial to accomplish. Thank you very much!