github.com/yunabe/lgo@v0.0.0-20190709125917-42c42d410fdf/converter/testdata/wrap_gostmt_bind.golden (about) 1 package lgo_exec 2 3 import pkg0 "github.com/yunabe/lgo/core" 4 import "fmt" 5 func lgo_init() { 6 7 for i := 0; i < 10; i++ { 8 { 9 gofn := func(id int) { 10 fmt.Println("id =", id) 11 } 12 goarg := i 13 ectx := pkg0.InitGoroutine() 14 go func() { 15 defer pkg0.FinalizeGoroutine(ectx) 16 gofn(goarg) 17 }() 18 } 19 } 20 }