I'm trying to make http queries in parallel and then wait for all to finish:
g1, _ := go http.Get('http://example.com/1')
g2, _ := go http.Get('http://example.com/2')
res1 := g1.wait() or { panic(err) }
res2 := g2.wait() or { panic(err) }
data1 := json.decode(ApiResult, res1.text) or { panic(err) }
data2 := json.decode(ApiResult, res2.text) or { panic(err) }
I get the following error:
src/main.go:159:11: syntax error: unexpected go, expecting expression