diff --git a/main.go b/main.go index 976d5fa0..a348a11f 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,7 @@ import ( "io/ioutil" "os" "path/filepath" + "sort" "strconv" "strings" @@ -372,6 +373,11 @@ func main() { } } + // Sort protoList so the marshaled list is reproducible + sort.SliceStable(protoList.Entry, func(i, j int) bool { + return protoList.Entry[i].CountryCode < protoList.Entry[j].CountryCode + }) + protoBytes, err := proto.Marshal(protoList) if err != nil { fmt.Println("Failed:", err)