github.com/traefik/yaegi@v0.15.1/interp/testdata/concurrent/composite/composite_sparse.go (about)

     1  package main
     2  
     3  import (
     4  	"time"
     5  )
     6  
     7  type foo struct {
     8  	bar string
     9  }
    10  
    11  func main() {
    12  	for i := 0; i < 2; i++ {
    13  		go func() {
    14  			a := foo{bar: "hello"}
    15  			println(a)
    16  		}()
    17  	}
    18  	time.Sleep(time.Second)
    19  }