This example demonstrates decoding a JPEG image and examining its pixels.
Package image implements a basic 2-D image library.
which is the correct package synopsis.
The erroneous synopsis comes from the package documentation of the image_test package which provides the package-level Example.
It's possible that other packages are effected but this is the only one I found.
From a cursory look at *go/build.Context.Import it appears that this is caused by the loop grabbing the first synopsis found in any file (lines 816-818 below) when it seems as if it should ignore test and xtest files using the variables isTest and isXTest
I would have put the bit of code on the playground but using go/build doesn't work there. Is that another bug or just a limitation of the playground?
Depends on how you view it. The playground's filesystem is fake -- see "Faking the file system" in https://blog.golang.org/playground. It can be prepopulated, so we could prepopulate it with the standard library. But I don't really think that'd be worth the effort.
FWIW, I actually prefer pasted code to playground links, at least for small bits of code. Making skimming issues easier, particularly on my phone.