Last active
June 17, 2016 16:02
-
-
Save kevin-cantwell/46e231f54561868c75c0cbd640770ea0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "unsafe" | |
| ) | |
| func main() { | |
| type Foo struct { | |
| a int32 | |
| b int32 | |
| c int32 | |
| d int32 | |
| } | |
| var foo Foo | |
| fmt.Println(unsafe.Sizeof(foo)) // prints 16 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment