1 | package mypkg |
---|---|
2 | |
3 | import ( |
4 | "log" |
5 | "net/http" |
6 | "os" |
7 | ) |
8 | |
9 | var l = log.New(os.Stderr, "mypkg", 0) |
10 | |
11 | func init() { |
12 | go func() { |
13 | l.Fatal(http.ListenAndServe(":8080", nil)) |
14 | }() |
15 | } |
16 | |
17 | func Exported() { |
18 | unexported() |
19 | } |
20 | func unexported() {} |
21 | |
22 | var T = new(myType) |
23 | |
24 | type Iface interface { |
25 | Dynamic() |
26 | } |
27 | |
28 | type myType struct{} |
29 | |
30 | func NewMyType() *myType { |
31 | return &myType{} |
32 | } |
33 | |
34 | func (t *myType) Static() {} |
35 | func (t *myType) Dynamic() {} |
36 | |
37 | func Regular() { |
38 | defer deferred() |
39 | go concurrent() |
40 | } |
41 | func deferred() {} |
42 | func concurrent() {} |
43 |
Members