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
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