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 / staticcheck / testdata / src / CheckLoopEmptyDefault / CheckLoopEmptyDefault.go
1 package pkg
2
3 func fn() {
4         var ch chan int
5         select {
6         case <-ch:
7         default:
8         }
9
10         for {
11                 select {
12                 case <-ch:
13                 default: // want `should not have an empty default case`
14                 }
15         }
16
17         for {
18                 select {
19                 case <-ch:
20                 default:
21                         println("foo")
22                 }
23         }
24
25         for {
26                 select {
27                 case <-ch:
28                 }
29         }
30 }