Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • 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