github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/talks/2015/tricks/compare-map.go (about) 1 // +build ignore 2 3 package main 4 5 import "io/ioutil" 6 7 func main() { 8 // BEGIN OMIT 9 a := map[int]bool{} 10 a[42] = true 11 12 type T struct { 13 i int 14 s string 15 } 16 17 b := map[*T]bool{} 18 b[&T{}] = true 19 20 c := map[T]bool{} 21 c[T{37, "hello!"}] = true 22 23 d := map[interface{}]bool{} 24 d[42] = true 25 d[&T{}] = true 26 d[T{123, "four five six"}] = true 27 d[ioutil.Discard] = true 28 // END OMIT 29 }