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
/
single-case-select
/
single-case-select.go
1
package pkg
2
3
func fn() {
4
var ch chan int
5
select { // want `should use a simple channel send`
6
case <-ch:
7
}
8
outer:
9
for { // want `should use for range`
10
select {
11
case <-ch:
12
break outer
13
}
14
}
15
16
for { // want `should use for range`
17
select {
18
case x := <-ch:
19
_ = x
20
}
21
}
22
23
for {
24
select { // want `should use a simple channel send`
25
case ch <- 0:
26
}
27
}
28
}