Last active
January 6, 2021 13:59
-
-
Save olso/238de340360b0d78f9cd7266f2ad1295 to your computer and use it in GitHub Desktop.
https://github.com/olso/go-wasm-cat-game-on-canvas-with-docker 🧶 https://olso.space 🧶 https://twitter.com/olso_uznebolo
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
func main() { | |
// https://stackoverflow.com/a/47262117 | |
// creates empty channel | |
runGameForever := make(chan bool) | |
setup() | |
// attempt to receive from empty channel | |
// since noone ever sends anything on it, it's essentially a blocking forever operation | |
// we basically have a daeomon/service/background program | |
// in WASM world, our game will keep running 😉 | |
<-runGameForever | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment