Created
April 9, 2023 09:33
-
-
Save dumindu/778866da6bf51aa65044fc197b47a905 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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