cmd/gofmt: fix symlink file truncation
Currenty `go fmt` does not truncate the symlinked file, as it compares the size of the recorded data not with the real file size, but with the symlink reference path length. Fixes #79735 Change-Id: Ic52e8ee4a1c6047a8e3f7d303fc8019beceb910e GitHub-Last-Rev: 5a37ef7f9ceed60060d11edcca0f8d26f2bc3c3b GitHub-Pull-Request: golang/go#79715 Reviewed-on: https://go-review.googlesource.com/c/go/+/784320 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Mark Freeman <markfreeman@google.com>
A
Artem Navrotskiy committed
5f711bfdb35cc26413b86785f58b7ed37a25a0dc
Parent: d96f55f
Committed by Gopher Robot <gobot@golang.org>
on 5/29/2026, 6:31:40 PM