<pre class="notranslate">unsafe.Sizeof(image.RGBAColor{}) == 8

this means that a 32-bit-per-pixel image actually
uses 64 bits, which seems a harsh price to pay.

in general, i'd hope that a struct size be padded
to fulfill the alignment requirement of its largest member
and no more.</pre>
<p dir="auto">Following program using Fscanf panics,</p>
<p dir="auto"><a href="http://play.golang.org/p/0vdaUh2hJp" rel="nofollow">http://play.golang.org/p/0vdaUh2hJp</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="panic: unexpected newline

goroutine 1 [running]:
main.main()
    /tmp/sandbox/1.go:19 +0x3af
exit status 2"><pre class="notranslate"><code class="notranslate">panic: unexpected newline

goroutine 1 [running]:
main.main()
    /tmp/sandbox/1.go:19 +0x3af
exit status 2
</code></pre></div>
<p dir="auto">Another similar program using Scanf seems to work fine,</p>
<p dir="auto"><a href="http://play.golang.org/p/rrBjFXuC0a" rel="nofollow">http://play.golang.org/p/rrBjFXuC0a</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ go run 2.go &lt; input

$ hexdump input
0000000 31 0a 32 0a                                    
0000004"><pre class="notranslate"><code class="notranslate">$ go run 2.go &lt; input

$ hexdump input
0000000 31 0a 32 0a                                    
0000004
</code></pre></div>
<p dir="auto">on commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/golang/go/commit/335e44d265e7b7741b00237f4fcd97a1b80bfd9a/hovercard" href="https://github.com/golang/go/commit/335e44d265e7b7741b00237f4fcd97a1b80bfd9a"><tt>335e44d</tt></a></p>
<p dir="auto">Am I doing something terribly wrong or there is a legit bug? I've also file one relevant bug - <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="76325990" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/10853" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/10853/hovercard" href="https://github.com/golang/go/issues/10853">#10853</a></p>