Description
FormatPorts produces nondeterministic output because it iterates over a map[key][]PortMapping without sorting the keys.
Since Go map iteration order is random, the generated port string can change between runs (e.g., tcp group printed before udp or vice versa).
This causes the TestFormatPorts/mixed_tcp_and_udp_with_consecutive_ports_on_anyhost test to fail intermittently.
--- FAIL: TestFormatPorts (0.00s)
--- FAIL: TestFormatPorts/mixed_tcp_and_udp_with_consecutive_ports_on_anyhost (0.00s)
formatter_test.go:191: assertion failed: 0.0.0.0:3000-3001->8080-8081/tcp, 0.0.0.0:3002-3003->8082-8083/udp (tt.expected string) != 0.0.0.0:3002-3003->8082-8083/udp, 0.0.0.0:3000-3001->8080-8081/tcp (result string)
FAIL