So this doesn't work : package main
func main() { type Foo struct{Bar} type Bar struct{Foos []Foo} } https://play.golang.org/p/yNQolvBc8i Is there an alternative aside from declaring types globally ? If not is there a specific reason why it works like that ? is there a risk of ambiguous behavior I'm not aware of if it would be allowed ? The reason I ask this is in the context of examples, declarations outside examples are AFAIK not printed in the docs. regards. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.