interfaces
This commit is contained in:
1 parent
7a51de11e4
commit
7bb1fe712b
4 files changed
+57
No files matched your search
@@ -0,0 +1,3 @@
|
||||
module lovelynet.net/maps
|
||||
|
||||
go 1.17
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user