interfaces

This commit is contained in:
benjamyn committed 2021-10-02 16:28:28 +10:00
1 parent 7a51de11e4
commit 7bb1fe712b
4 files changed
+57

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
module lovelynet.net/maps
go 1.17
+19
View File
@@ -0,0 +1,19 @@
package main
import "fmt"
func main() {
colours := map[string]string{
"red": "#ff0000",
"green": "#4bf745",
"white": "#ffffff",
}
printMap(colours)
}
func printMap(c map[string]string) {
for colour, hex := range c {
fmt.Println(colour, hex)
}
}