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] Re: Printing a slice of structs recursively

2021-09-02 Thread Michael Ellis
Here's one way. https://goplay.space/#5KzrUc0171N On Thursday, September 2, 2021 at 1:03:48 AM UTC-4 seank...@gmail.com wrote: > Try doing it recursively, passing in both the current parent id and > indentation level > > On Thursday, September 2, 2021 at 3:55:01 AM UTC+2 n.erde...@gmail.com >

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

2021-09-01 Thread Sean Liao
Try doing it recursively, passing in both the current parent id and indentation level On Thursday, September 2, 2021 at 3:55:01 AM UTC+2 n.erde...@gmail.com wrote: > i need some help with printing a slice of structs which there is a child - > parent relation in the struct. > *type* Emp