github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/backup/unsafe5.gno (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"unsafe"
     6  )
     7  
     8  type S struct {
     9  	X int
    10  	Y int
    11  	Z int
    12  }
    13  
    14  func main() {
    15  	size := unsafe.Sizeof(S{})
    16  	align := unsafe.Alignof(S{})
    17  
    18  	fmt.Println(size, align)
    19  }
    20  
    21  // Output:
    22  // 24 8