github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/talks/2012/simple/flag.go (about) 1 // +build OMIT 2 3 package main 4 5 import ( 6 "flag" 7 "fmt" 8 "time" 9 ) 10 11 var ( 12 message = flag.String("message", "Hello!", "what to say") 13 delay = flag.Duration("delay", 2*time.Second, "how long to wait") 14 ) 15 16 func main() { 17 flag.Parse() 18 fmt.Println(*message) 19 time.Sleep(*delay) 20 }