Choose Category
package main import ( "fmt" ) func test(done chan bool) { fmt.Println("test func goroutine") done <- true } func main() { done := make(chan bool) go test(done) <-done fmt.Println("main function") }