github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/talks/2012/concurrency/support/mainboring.go (about)

     1  // +build OMIT
     2  
     3  package main
     4  
     5  import (
     6  	"fmt"
     7  	"math/rand"
     8  	"time"
     9  )
    10  
    11  func main() {
    12  	boring("boring!")
    13  }
    14  // STOP OMIT
    15  
    16  func boring(msg string) {
    17  	for i := 0; ; i++ {
    18  		fmt.Println(msg, i)
    19  		time.Sleep(time.Duration(rand.Intn(1e3)) * time.Millisecond)
    20  	}
    21  }