github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/map27.gno (about) 1 package main 2 3 import ( 4 "fmt" 5 "text/template" 6 ) 7 8 type fm map[string]interface{} 9 10 type foo struct{} 11 12 func main() { 13 a := make(fm) 14 a["foo"] = &foo{} 15 fmt.Println(a["foo"]) 16 17 b := make(template.FuncMap) // type FuncMap map[string]interface{} 18 b["foo"] = &foo{} 19 fmt.Println(b["foo"]) 20 } 21 22 // Output: 23 // &{} 24 // &{}