type expansionGenerator … // We only want to call GenerateType() once per group. func (g *expansionGenerator) Filter(c *generator.Context, t *types.Type) bool { … } func (g *expansionGenerator) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { … } var expansionInterfaceTemplate … var namespacedExpansionInterfaceTemplate …