Re: [go-nuts] where is go code generate type info?

2020-08-14 Thread Mikael Gustavsson
But those two lines don't do much, the first line reads the type pointer out of the interface, and the function toType is just a nil check: https://golang.org/src/reflect/type.go?s=38892:38923#L2963 I'm guessing xie cui is looking for where the instances of for example structType: https://golan

[go-nuts] Re: converting slice of items into nested array

2016-12-08 Thread Mikael Gustavsson
There's no need to use maps, you want to follow this pattern: for i := range items { if i==0 || !grouped(i-1, i) { appendToResult } appendToGroup } Here's the full example: https://play.golang.org/p/1e0rDDmq7b -- You received this message because you are subscribed to the Google Group