Last active
December 16, 2019 11:05
-
-
Save jjuliano/2a344c7bc258c1fa769f626b585cecb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import( | |
"fmt" | |
"github.com/google/uuid" | |
) | |
func main() { | |
variable := map[interface{}]string{} | |
variable[1] = "from an integer key" | |
variable["a"] = "from string key" | |
uuid := uuid.New() | |
variable[uuid] = "from a UUID key" | |
fmt.Println(variable[1]) // from an integer key | |
fmt.Println(variable["a"]) // from string key | |
fmt.Println(variable[uuid]) // from a UUID key | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment