go/format: Change parserMode var to const.
Refactor based on review feedback.

Use standard bytes.TrimSpace instead of custom cutSpace. It operates on
Unicode rather than bytes.
Move j++ into for loop post-statement.
Remove unnecessary empty line.