-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Milestone
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
go version go1.8.1 linux/amd64
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOHOSTOS="linux"
GCCGO="gccgo"
CC="gcc"
What did you do?
I ran the attached playground link.
https://play.golang.org/p/EjvBekU87U
What did you expect to see?
I expect the displayed map
output to be deterministic.
What did you see instead?
It changes randomly.
I understand that map randomizes the key order, and I actually think this is a cool implementation feature, however I think the displayed text output should be deterministic. It could display by sorted key order for example.
This will make diff-ing logs, and viewing output more consistent, with less flip-flop.
Thanks,
James
CreativeCactus, purpleidea, arp242, jmikkola, yanpozka and 7 moredominikh, cznic, zegl, vcabbage, klauspost and 9 more