- 2025-12-14: Sync with go1.26.0-pre-rc1
- except (because it uses go1.26 specific elements):
internal/testenv/testenv_unix.gointernal/platform/zosarch.go
- except (because it uses go1.26 specific elements):
- 2025-07-04: Sync with go1.24.4
- 2025-04-14: Sync with go1.23.8
- 2024-08-17: Sync with go1.22.6
- 2023-02-28: Sync with go1.21.7
- 2023-10-04: Sync with go1.20.8
- 2023-10-04: Sync with go1.19.13
- 2022-08-31: Sync with go1.18.5
- https://github.com/golang/go/blob/master/src/cmd/gofmt/
- https://github.com/golang/go/blob/master/src/internal/cfg
- https://github.com/golang/go/blob/master/src/internal/goarch
- https://github.com/golang/go/blob/master/src/internal/testenv
- https://github.com/golang/go/blob/master/src/internal/platform
- https://github.com/golang/go/blob/master/src/internal/diff -> replaced by
github.com/rogpeppe/go-internal/diff
go/src/cmd/gofmt/internal.go and go/src/go/format/internal.go are identical.
The parserMode is a global variable for gofmt and a constant for go/format.
The constants (tabWidth, printerMode, printerNormalizeNumbers) are duplicated inside:
Theoretically, only the following files are required:
gofmt.go(only the constants (tabWidth,printerMode,printerNormalizeNumbers))internal.goLICENSErewrite.gosimplify.go
But it's easier to synchronize everything to follow changes.
But the isolation of internal packages from Go can be complex, so maybe, at some point, we will reduce the number of files and so remove the internal/internal directory (and the test files).