so here comes the stupid part of go keys make string len datacenters for id range datacenters keys append keys  id sort strings keys  for id range keys datacenter datacenters id and this is not generally extractable into a reusable function because go has not generics otherwise the order is not deterministic and tests expectations will not always match 