Go struct memory layout is currently undefined[0], so you&#x27;re already not supposed to hand structs off to C, or to memcpy it to or from the wire. Unless you&#x27;re using cgo <i>maybe</i>, I don&#x27;t know if (or that) cgo provides any guarantee.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;issues&#x2F;10014" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;issues&#x2F;10014</a>