fmt: give correct error for % at end of string when scanning
Previously it said, "bad verb %% for ...", which is not only wrong, it's ironic as the fix is to use %% rather than % at the end of the string. Diagnose the case where a simple % is at EOF. If there's anything after the percent, the error is already good but this CL also puts quotes around the verb designation ('%d' etc.) to make it even clearer, especially when there is a space involved. Fixes #12315. Change-Id: I31d30659965e940d0bd9ce92a475aab3e2369ef0 Reviewed-on: https://go-review.googlesource.com/17150Reviewed-by: Ian Lance Taylor <iant@golang.org>
Showing
Please
register
or
sign in
to comment