https://codereview.appspot.com/5285042/
This has proven surprisingly useful in cutting down on fragile tests, where order was relied on for a set of items, the code was later changed to insert in a different order, and then the test was exposed as never being right.
Also of note, if you range over map of comparable keys with text/template, the order is reliable: http://golang.org/pkg/text/template/
https://codereview.appspot.com/5285042/
This has proven surprisingly useful in cutting down on fragile tests, where order was relied on for a set of items, the code was later changed to insert in a different order, and then the test was exposed as never being right.
Also of note, if you range over map of comparable keys with text/template, the order is reliable: http://golang.org/pkg/text/template/