projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Giant blob of minor changes
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
coc-go-data
/
tools
/
pkg
/
mod
/
honnef.co
/
go
/
tools@v0.0.1-2020.1.5
/
simple
/
testdata
/
src
/
CheckRedundantReturn
/
LintRedundantReturn.go
1
package pkg
2
3
func fn1() {
4
return // want `redundant return`
5
}
6
7
func fn2(a int) {
8
return // want `redundant return`
9
}
10
11
func fn3() int {
12
return 3
13
}
14
15
func fn4() (n int) {
16
return
17
}
18
19
func fn5(b bool) {
20
if b {
21
return
22
}
23
}
24
25
func fn6() {
26
return
27
println("foo")
28
}
29
30
func fn7() {
31
return
32
println("foo")
33
return // want `redundant return`
34
}
35
36
func fn8() {
37
_ = func() {
38
return // want `redundant return`
39
}
40
}