github.com/serversong/goreporter@v0.0.0-20200325104552-3cfaf44fd178/linters/staticcheck/testdata/CheckLeakyTimeTick-main.go (about)

     1  package main
     2  
     3  import "time"
     4  
     5  func fn2() {
     6  	for range time.Tick(0) {
     7  		println("")
     8  		if true {
     9  			break
    10  		}
    11  	}
    12  }
    13  
    14  func main() {
    15  	_ = time.Tick(0)
    16  }