Re: [go-nuts] Re: Printing a slice of structs recursively

2021-09-05 Thread erdem erdem
sorry to answer you late. i couldn't find the time to check your responses first of all, thank you for the answers Michael i changed your code a bit because there was an unnecessary recursion if you wanna check it out here is a new link for it https://play.golang.org/p/4MSOb6OKvKY Michael Ellis ,

[go-nuts] Printing a slice of structs recursively

2021-09-01 Thread erdem erdem
i need some help with printing a slice of structs which there is a child - parent relation in the struct. *type* Emp *struct* { id int name string parentID int } probably the best way to do it recursively but i couldnt manage to do https://play.golang.org/p/jHcbu3