To address additional questions:

* No, I don't think regexp.exec mutates data; it instead tracks `lastIndex` to determine where to  begin the next time `exec` is called
* No, there should not be empty lines in `gofmt` output, although the regexp is tolerant of that scenario
* Yes, we are tolerant for a scenario where an error is broken across an end-of-line boundary – in that scenario we'd show the content from the first line; that said, I don't believe `gofmt` breaks errors across lines, nor does it display comments in error output