github.com/yunabe/lgo@v0.0.0-20190709125917-42c42d410fdf/converter/testdata/wrap_gostmt_nest.golden (about) 1 package lgo_exec 2 3 import pkg0 "github.com/yunabe/lgo/core" 4 func lgo_init() { 5 pkg0.LgoRegisterVar("f", &f) 6 f = func(x, y int) int { return x + y } 7 { 8 gofn0 := func(x int) { 9 { 10 gofn := f 11 goarg := x 12 goarg0 := 20 13 ectx := pkg0.InitGoroutine() 14 go func() { 15 defer pkg0.FinalizeGoroutine(ectx) 16 gofn(goarg, goarg0) 17 }() 18 } 19 } 20 goarg1 := 10 21 ectx0 := pkg0.InitGoroutine() 22 go func() { 23 defer pkg0.FinalizeGoroutine(ectx0) 24 gofn0(goarg1) 25 }() 26 } 27 } 28 var ( 29 f func(x int, y int) int 30 )