Golang: convert slices into map
问题 Is there an easy/simple means of converting a slice into a map in Golang? Like converting an array into hash in perl is easy to do with simple assignment like %hash = @array this above will convert all the elements in the array into a hash, with keys being even-numbered index elements while the values will be odd-numbered index elements of the array. In my Go code, I have slices of string and would like to convert it into a map. I am wondering if there is a Go's library code to do this. func