Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on On Go, Portability, and System Interfaces.
main.go
package main /* struct packed { unsigned char a; unsigned long long b; unsigned char c; } __attribute__((packed)); */ import "C" type Packed C.struct_packed
package main type Packed struct { A uint8 Pad_cgo_0 [8]byte C uint8 }
There are no comments on this comment yet.
main.go
go tool cgo -godefs main.go We lost packed.b field. Go doesn't support packed structs. More info here: https://groups.google.com/forum/#!topic/golang-nuts/UX5srUMt...