aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/encode.go
diff options
context:
space:
mode:
authorMark F <fenderovlol@gmail.com>2026-01-15 13:19:10 +0100
committerGopher Robot <gobot@golang.org>2026-01-22 13:04:53 -0800
commit858d4bf8511a7741cf5c21f1d51b23ed180fd450 (patch)
treebe1826d48d3d115447c6e8c9c2da3853ea7c06e8 /src/encoding/json/encode.go
parent8e3104dc269b959083f7e7133841e3366a477ef1 (diff)
downloadgo-858d4bf8511a7741cf5c21f1d51b23ed180fd450.tar.xz
debug/elf: return FormatError when reading short files
NewFile returns the raw error from ReadAt when failing to read the ELF identifier, typically io.EOF for empty or short files. This breaks the API contract that all parsing failures should return *FormatError. Wrap the error in FormatError for consistency with other error paths. Fixes #76338 Change-Id: Ic4ed77316fcc459ce8cbe9e9506d7cf8e9286623 Reviewed-on: https://go-review.googlesource.com/c/go/+/736600 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding/json/encode.go')
0 files changed, 0 insertions, 0 deletions