projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
cb74a895f671945ccb37d584e93c3b8da6acfb45
[dotfiles/.git]
/
functions.go
1
package main
2
3
type state func() state
4
5
func a() state {
6
return a
7
}
8
9
func main() {
10
st := a
11
_ = st()
12
}
13
14
type t1 struct{} // want `t1`
15
type t2 struct{}
16
type t3 struct{}
17
18
func fn1() t1 { return t1{} } // want `fn1`
19
func fn2() (x t2) { return }
20
func fn3() *t3 { return nil }
21
22
func fn4() {
23
const x = 1
24
const y = 2 // want `y`
25
type foo int // want `foo`
26
type bar int
27
28
_ = x
29
_ = bar(0)
30
}
31
32
func init() {
33
fn2()
34
fn3()
35
fn4()
36
}