Sign in
go
/
website
/
1e75b26cba0e55a9f61c79dbb46459a4e6ddbd65
/
.
/
_content
/
talks
/
2014
/
compiling
/
const3.go
blob: 59d3f1699d2e518965671fbb799cd2522c0f4c64 [
file
] [
log
] [
blame
]
// +build ignore
package main
import (
"fmt"
"unsafe"
)
// 1 START OMIT
var V1 = 0x01020304
var V2 [unsafe.Sizeof(V1)]byte
func main() {
*(*int)(unsafe.Pointer(&V2)) = V1
fmt.Println(V2)
}
// 1 END OMIT