.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.1.1 / unused / testdata / src / functions / functions.go
1 package main
2
3 type state func() state // used
4
5 func a() state { // used
6         return a
7 }
8
9 func main() { // used
10         st := a
11         _ = st()
12 }
13
14 type t1 struct{} // unused
15 type t2 struct{} // used
16 type t3 struct{} // used
17
18 func fn1() t1     { return t1{} } // unused
19 func fn2() (x t2) { return }      // used
20 func fn3() *t3    { return nil }  // used
21
22 func fn4() { // used
23         const x = 1  // used
24         const y = 2  // unused
25         type foo int // unused
26         type bar int // used
27
28         _ = x
29         _ = bar(0)
30 }
31
32 func init() { // used
33         fn2()
34         fn3()
35         fn4()
36 }