Hi, I have a slice of points:
type Point strcut { Gateway string Channel int Devce int } Now I execute cc := make([]Point, 0) // Fill cc with points (skipped here). sort.SliceStable(cc, func(i, j int) bool { return cc[i].Device < cc[j].Device }) sort.SliceStable(cc, func(i, j int) bool { return cc[i].Channel < cc[j].Channel }) sort.SliceStable(cc, func(i, j int) bool { return cc[i].Gateway < cc[j].Gateway }) I use this sorting mechanism in tests and the funny part is that sometimes the tests pass and sometimes they don't. It seems that the slice is sometimes sorted properly and sometimes it isn't obviously sorted. How is that possible? Is the compiler doing some funky stuff that is not entirely correct? Or am I doing something wrong? Thanks! -- 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.