Here's an example of how to create a map with a key of type float64 in Go:
main.go199 chars13 lines
In this example, we're using the built-in make
function to create the map with the float64
type as the key type and string
as the value type. Then we're assigning values to the map using floating-point literals. Finally, we're printing the values by accessing the map with the respective keys.
gistlibby LogSnag