From 3403886e48dbed0b31f5dc464a1ce283d441ccb6 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sun, 14 Apr 2024 21:48:03 +0200 Subject: [PATCH] insert setup call and wait for routine --- main.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.go b/main.go index 6377540..c1e9596 100644 --- a/main.go +++ b/main.go @@ -35,7 +35,17 @@ func main() { // Initialize resty client client := resty.New() + // Run Game of Life + done := setup(func(c [][]Cell) { + output(client, url, width, height, c) + }, width, height, 5) + // Wait for user input to quit + var input string + fmt.Scanln(&input) + // Stop Game of Life, wait for routine + done <- true + <-done // // Initialize custom matrix data // col := Color{R: 255, G: 0, B: 255, Endpoint: COLOR}