mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
This change writes the unformatted Go source code to a temp file if "format.Source" fails. Print the temp file path to the console to make it easy to find. The source code is what causes formatting errors, and it can be difficult to diagnose them without this context. Fixes golang/go#57925 Change-Id: Ifa4d8a6e8bc5006357b0bc88afce5ba1d6fe0a48 Reviewed-on: https://go-review.googlesource.com/c/sys/+/463216 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Quim Muntal <quimmuntal@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>