a6cfdee731fcb349fd5f3ea68be9a187dcc4add2
[dotfiles/.git] / defer.go
1 package pkg
2
3 type t struct{}
4
5 func (t) fn1() {}
6 func (t) fn2() {}
7 func fn1()     {}
8 func fn2()     {}
9
10 func Fn() {
11         var v t
12         defer fn1()
13         defer v.fn1()
14         go fn2()
15         go v.fn2()
16 }