fork download
  1. package main
  2. import "fmt"
  3.  
  4. func ready(w string, sec int) {
  5. time.Sleep(int64(sec) * 1e9)
  6. fmt.Println(w, "is ready!")
  7. }
  8.  
  9. func main() {
  10. go ready("Tea" 2)
  11. go ready("Coffee" 1)
  12. fmt.Println("I'm Waiting")
  13. time.Sleep(5 * 1e9)
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.go:10: syntax error: unexpected literal, expecting )
prog.go:11: syntax error: unexpected literal, expecting )
prog.go:14: missing newline at end of file
stdout
Standard output is empty