mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
28 lines
258 B
Go
28 lines
258 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
type test struct {
|
|
v interface{}
|
|
s string
|
|
}
|
|
|
|
type T struct {
|
|
name string
|
|
}
|
|
|
|
func main() {
|
|
t := []test{
|
|
{
|
|
v: []interface{}{
|
|
T{"hello"},
|
|
},
|
|
s: "world",
|
|
},
|
|
}
|
|
fmt.Println(t)
|
|
}
|
|
|
|
// Output:
|
|
// [{[{hello}] world}]
|