Deprecate ArchChar
go/build.ArchChar once returned the single-character code for an architecture (such as 6 for amd64), which the old toolchain used in tool names like 6g. Since Go 1.5, the toolchain no longer uses these codes. The function now always returns an error, whatever the architecture.
The proposal marks ArchChar as deprecated so that linters and editors warn about it. It has no replacement, and new code should not call it.
// Deprecated: Since Go 1.5 ArchChar always returns an error.
func ArchChar(goarch string) (string, error)
- Proposal
- #75129 by florianl
- Status
- Implemented on Oct 9, 2026
- Release
- Go 1.28
- Impact
- low
- Area
- go/build