Skip to content

Instantly share code, notes, and snippets.

@tilaklodha
Created September 24, 2017 23:04
Show Gist options
  • Save tilaklodha/618f6a11c192bdd7153d9f8ab719df36 to your computer and use it in GitHub Desktop.
Save tilaklodha/618f6a11c192bdd7153d9f8ab719df36 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"time"
)
func print() {
fmt.Println("Printing from goroutine")
}
func main() {
go print()
time.Sleep(1 * time.Second)
fmt.Println("Printing from main")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment