1
2
3
4
5
6
7
8
9 package main
10
11 import "fmt"
12
13 const tpl = `
14 func Test%d(t %s) {
15 _ = t
16 _ = t
17 }
18 `
19
20 func main() {
21 fmt.Println("package main")
22 types := []string{
23
24 "bool", "int", "rune",
25 "*int", "uintptr",
26 "float32", "float64",
27 "chan struct{}",
28 "map[string]struct{}",
29 "func()", "func(string)error",
30
31
32 "complex64", "complex128",
33 "struct{}", "struct{n int}", "struct{e error}", "struct{m map[string]string}",
34 "string",
35 "[4]byte",
36 "[]byte",
37 "interface{}", "error",
38 }
39 for i, typ := range types {
40 fmt.Printf(tpl, i, typ)
41 }
42 fmt.Println("func main() {}")
43 }
44
View as plain text