Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dumindu/778866da6bf51aa65044fc197b47a905 to your computer and use it in GitHub Desktop.
Save dumindu/778866da6bf51aa65044fc197b47a905 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
var done = make(chan bool, 1)
func main() {
go write()
<-done
}
func write() {
fmt.Println("Hello world!")
done <- true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment