mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
21 lines
174 B
Go
21 lines
174 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"unsafe"
|
|
)
|
|
|
|
type S struct {
|
|
X int
|
|
Y int
|
|
Z int
|
|
}
|
|
|
|
func main() {
|
|
x := [2]S{{Z: 5}, {Z: 10}}
|
|
|
|
s := unsafe.Slice(&x[0], 2)
|
|
|
|
fmt.Println(s)
|
|
}
|