ETL problem - Alphabetic Map

I am not complaining, but I don’t understand how my new_map in the etl problem is automatically alphabetically ordered

package etl

import (
	"strings"
)

func Transform(input map[int][]string) map[string]int {

	new_map := make(map[string]int)

	for key, mini_array := range input {
		for _, charc := range mini_array {
			new_map[strings.ToLower(charc)] = key
		}
	}
	return new_map
}

I’m assuming that it’s not “automatically” ordered: the input arrays happen to be already sorted. And if you look at the the etl_test.go file, the equal function does not require the maps to be in any order.

1 Like