SHARE
TWEET

Untitled

a guest Aug 25th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     colors := map[string]string{
  7.         "red":   "#ff0000",
  8.         "green": "#00ff00",
  9.         "white": "#ffffff",
  10.     }
  11.  
  12.     printMap(colors)
  13.  
  14. }
  15.  
  16. func printMap(c map[string]string) {
  17.     for color, hex := range c {
  18.         fmt.Println("Hex value for", color, "is", hex)
  19.     }
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top