It's not an 'off by 10' error, it's that the javascript wants to
scroll the highlighted lines (s=830:971) to the top of the screen (the
first highlighted line is line 31). The #L21 links directly to line 21
within the document and the javascript scrollIntoView call happens
afterwards.
I'm not sure why the godoc links include the highlighting and the line
number. I think that's a bug.
The source view is hosted at
golang.org/src/pkg/, which does currently
not have old revisions of the code. You're proposing adding links to
code.google.com, but right now
golang.org and godoc are nicely
self-contained and for the most part don't need to know about
code.google.com.