SIGN IN SIGN UP

encoding/json: refactor tests to use string literals for error offset

Instead of using a number literal like:
    SyntaxError{..., Offset: 7}
which is fairly unreadable, use a string literal like:
    SyntaxError{..., Offset: len64(`{"X":12`)}

This makes it easier to visually see what is included as part of the offset.

Also, clean up some usages of int64(len(...) to be len64(...).

Updates #79659

Change-Id: If30aa38487849814b05a8cc5af700ec10aadc7f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/785000
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Damien Neil <dneil@google.com>
J
Joe Tsai committed
38c30806f9da367dc26fe45c063132720d3f75ff
Parent: eb343e2