Skip to content
CAI
Software that uses CAICheck a score

golang/go

44.1

Weak · 24 September 2026

867.4k

lines of production code

Go

primary language

3

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is the Go programming language toolchain and standard library, providing the compiler, linker, and core packages necessary to build and run Go applications. It encompasses a comprehensive suite of development utilities, including build management, testing, coverage analysis, and code formatting, alongside support for cross-compilation to diverse architectures and platforms. The codebase also includes infrastructure for cryptographic compliance, WebAssembly execution, and integration with external languages like C and Fortran.

How it got here

1972–2016 — SSA compiler migration and standard library expansion

111 changes.

This period focused on migrating the Go compiler to the SSA backend as the default for all architectures, significantly improving code generation and optimization. Concurrently, the standard library underwent massive expansion with new packages for iterators, structured logging, and filesystem abstraction, while core tools like cgo, the linker, and the go command were rewritten in Go for better maintainability and cross-platform consistency.

2017–2019 — go command modularization and toolchain expansion

104 changes.

This period focused on refactoring the monolithic go command into a modular architecture with dedicated internal packages for each subcommand, significantly improving code organization and maintainability. The work also expanded the toolchain's capabilities by introducing a build artifact cache, WebAssembly support, and extensive static analysis checks via the vet tool, while updating vendored dependencies to support new architectures and security features.

2020–2023 — Toolchain modernization and new architectures

120 changes.

This period focused on modernizing the Go toolchain through a major compiler backend rewrite, introducing a new object file format, and adding support for RISC-V and LoongArch64 architectures. It also delivered significant user-facing features including the embed directive, go work workspace management, and generic utilities for slices and maps, while expanding vet checks and test coverage across the ecosystem.

2024–2026 — telemetry, SIMD, and compiler refactoring

73 changes.

This period focused on implementing a comprehensive telemetry system for collecting usage and crash metrics, alongside introducing the unique and weak packages for value interning and safe references. Significant compiler work included a new Midway pass for SIMD code generation, various optimization passes for slice allocation and local variables, and extensive refactoring of the SSA backend and disassembly logic. The toolchain also expanded with new static analysis tools, PGO preprocessing, and stricter security enforcement for linkname directives.

Features

Add ChaCha20 and ChaCha20-Poly1305 cipher implementations to vendored x/crypto

The vendored golang.org/x/crypto package now includes the chacha20 and chacha20poly1305 packages, providing stream cipher and authenticated encryption with additional data (AEAD) capabilities. This addition brings in optimized assembly implementations for ARM64, PowerPC (VSX), and s390x architectures, alongside generic Go fallbacks, enabling faster cryptographic operations on these platforms. The chacha20poly1305 package also supports the XChaCha20-Poly1305 variant with extended nonces and includes FIPS 140-2 compatibility checks for restricted modes.

src/vendor · high confidence

Add FIPS 140 module snapshot management infrastructure

The lib/fips140 directory now provides the build and validation infrastructure for FIPS 140-3 compliant cryptographic snapshots. It includes a Makefile to generate versioned zip archives, a checksum file (fips140.sum) to ensure integrity, and text files (inprocess.txt, certified.txt, v1.0.0.txt) that map version aliases to specific certified or in-process module versions (e.g., v1.26.0 for in-process, v1.0.0-c2097c7c for certified).

lib/fips140 · high confidence

Add GMP wrapping example and concurrency demonstration

The misc/cgo/gmp directory now includes a complete example of wrapping the GNU MP (GMP) library in Go, featuring a new \gmp.go\ package that exposes GMP's multi-precision integer type (\mpz\_t\) as a Go \Int\ type with methods like \SetInt64\, \SetString\, and \Bytes\. Additionally, two new example programs are added: \pi.go\, which demonstrates calculating digits of pi using the GMP-wrapped integers, and \fib.go\, which illustrates coordination between Go goroutines and C pthreads by computing Fibonacci numbers across multiple threads.

misc/cgo · high confidence

Add Go command action tracing support

The Go command now includes a new internal tracing package that records events for each build action. This allows users to generate trace files compatible with the Chrome Trace Viewer, enabling visualization of action durations and dependencies (flows) between goroutines to help diagnose build performance.

src/cmd/go/internal/trace · high confidence

Add Gophertool Chrome extension for Go development navigation

Introduces the 'Hacking Gopher' Chrome extension, a utility for Go developers to quickly navigate to issues, code reviews, commits, and packages. The extension adds an omnibox keyword 'golang' to open URLs directly from the address bar and provides a popup interface with quick links to the issue tracker, codereview, commit history, package documentation, build status, and the Go GitHub repository. It supports input formats for numeric issue/CL numbers (with a lower bound of 150000 for CLs), Gerrit change IDs, commit hashes, and package names.

misc/chrome · high confidence

Add HTML demo page for running Go WebAssembly binaries

A new HTML page (wasm\_exec.html) is provided in the misc/wasm directory to demonstrate how to load and execute a Go-compiled WebAssembly binary in a browser. The page includes a polyfill for WebAssembly.instantiateStreaming to support older browsers, references the wasm\_exec.js runtime from lib/wasm, and provides a simple 'Run' button interface to trigger the Go program execution.

misc/wasm · high confidence

Add LoongArch64 (Loong64) instruction disassembly support

The \go tool objdump\ command now supports disassembling binaries for the LoongArch64 architecture. This change vendors the \golang.org/x/arch/loong64\ package, introducing the \loong64asm\ decoder which parses Loong64 instruction encodings and formats them into both GNU and Plan 9 assembler syntaxes, enabling users to inspect Loong64 binaries.

src/cmd/vendor/golang.org/x/arch/loong64 · high confidence

Add WebAssembly (Wasm) linker support

The linker now supports the WebAssembly architecture. This change introduces the \src/cmd/link/internal/wasm\ package, which registers the Wasm architecture via the \Init\ function in \obj.go\ and implements the core linking logic in \asm.go\. The implementation handles WebAssembly-specific features such as function index assignment, host imports, and the generation of valid Wasm binary sections.

src/cmd/link/internal/wasm · high confidence

Add WebAssembly SIMD support to the compiler

The Go compiler now supports WebAssembly SIMD (Single Instruction, Multiple Data) operations. This change introduces new SSA code generation logic in the wasm package to handle SIMD instructions, including lane extraction and replacement, splatting, logical and arithmetic operations, and saturation math, enabling Go code to leverage hardware-accelerated vector processing on WebAssembly targets.

src/cmd/compile/internal/wasm · high confidence

Add XCOFF file loader for AIX linking

The linker now supports loading XCOFF object files, which are the standard binary format for AIX. This change introduces the new \loadxcoff\ package, which parses XCOFF sections (text, data, bss) and symbols, converting them into the linker's internal symbol table and applying necessary relocations. This enables the Go toolchain to link AIX-specific binaries.

src/cmd/link/internal/loadxcoff · high confidence

Add applicative balanced tree implementation for immutable key-value storage

The Go compiler's internal package now includes a new applicative balanced tree (ABT) data structure in \src/cmd/compile/internal/abt\. This immutable tree allows updates to create new copies without affecting existing instances, supporting operations like insert, find, delete, and intersection. This change introduces the underlying data structure used by the compiler for efficient, safe sharing of symbol and type information during compilation.

src/cmd/compile/internal/abt · high confidence

Add asmdecl analyzer for riscv64 architecture support

The asmdecl analysis pass, which reports mismatches between assembly files and Go declarations, now includes support for the riscv64 architecture. This update allows the Go toolchain to validate assembly code written for riscv64 targets against their corresponding Go function declarations, ensuring consistency in assembly usage for this platform.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/asmdecl · high confidence

Add bzip2 decompression support

The standard library now includes a new compress/bzip2 package that provides bzip2 decompression via the NewReader function. This addition introduces a new reader type that parses bzip2 headers, handles block-based decompression with CRC verification, and supports concatenated bzip2 streams. The implementation includes bit-level reading, Huffman tree decoding, move-to-front decoding, and inverse Burrows-Wheeler transform, along with comprehensive test vectors for validation.

src/compress · high confidence

Add container/heap, container/list, and container/ring packages

The Go standard library now includes three new packages for common data structures. The container/heap package provides heap operations for any type that implements the heap.Interface, enabling efficient priority queue implementations. The container/list package introduces a doubly linked list with O(1) length retrieval and support for inserting, removing, and moving elements. The container/ring package offers circular list operations, including linking, unlinking, and moving within the ring. All three packages include comprehensive examples and tests to demonstrate usage.

src/container · high confidence

Add gofixdirective package to support //go:fix inline analysis

A new internal package, gofixdirective, has been added to handle the parsing and validation of //go:fix inline directives on functions, type aliases, and constants. This component enables the gofix and inline analysis passes to detect and process these directives, including validation logic to reject unsupported constructs like array types with non-literal lengths or constants defined using iota.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/internal · high confidence

Add iOS simulator support for running Go programs and tests

The misc/ios directory now includes a wrapper script (clangwrap.sh) and an execution helper (go\_ios\_exec.go) that enable building and running Go binaries on the iOS simulator. Users can set GOOS=ios and GOARCH=amd64 to target the simulator, with the wrapper automatically selecting the correct architecture and SDK. A new detect.go utility helps auto-configure required environment variables (GOIOS\_DEV\_ID, GOIOS\_APP\_ID, GOIOS\_TEAM\_ID) for code signing, and the README provides instructions for setting up the necessary tools like libimobiledevice.

misc/ios · high confidence

Add initial MIPS architecture support to the Go compiler

The Go compiler now supports the MIPS and MIPSLE architectures. This change introduces the backend implementation in src/cmd/compile/internal/mips, including SSA code generation (ssa.go), alignment and instruction emission helpers (galign.go, ggen.go), and initialization logic. It enables the compiler to generate correct machine code for MIPS targets, handling register allocation, floating-point operations, and memory alignment specific to the architecture.

src/cmd/compile/internal/mips · high confidence

Add internal linking support for MIPS64

The linker now supports internal linking for the MIPS64 architecture (including MIPS64LE). This change introduces the architecture-specific implementation in the \src/cmd/link/internal/mips64\ package, providing the necessary hooks for ELF relocation writing, PLT/GOT setup, and dynamic symbol handling. Users can now build and link Go binaries for MIPS64 targets without relying on an external linker.

src/cmd/link/internal/mips64 · high confidence

Add internal metadata tool for test logging

A new internal command, src/cmd/internal/metadata, has been added to print system metadata (GOARCH, CPU name, GOOS, and OS version) to standard output. This tool is designed to be used by cmd/dist during testing to provide detailed environment information in test logs, and it is excluded from installation via an 'ignore' build tag to avoid polluting the installed binaries.

src/cmd/internal/metadata · high confidence

Add linker benchmarking and profiling tool

The linker now includes an internal benchmarking package that allows recording per-phase memory and CPU profiles. This tool enables marking specific stages of the linking process to measure their duration, memory allocation, and live heap usage, with optional garbage collection between phases for accurate metrics. It also supports generating pprof CPU and memory profile files for detailed analysis of each phase's performance characteristics.

src/cmd/link/internal/benchmark · high confidence

Add low-level assembly syscall wrappers for multiple platforms

The \src/syscall\ package now includes new assembly files (e.g., \asm\_linux\_386.s\, \asm\_darwin\_amd64.s\, \asm\_freebsd\_arm64.s\) that implement low-level system call entry points such as \Syscall\, \Syscall6\, \Syscall9\, \RawSyscall\, and \RawSyscall6\ in native assembly. These files provide the fundamental bridge between Go code and the operating system kernel for architectures including Linux 386, Darwin AMD64/ARM64, FreeBSD ARM/ARM64/RISC-V64, AIX PPC64, and DragonFly/FreeBSD/NetBSD AMD64, replacing or supplementing previous Go-based or runtime-based implementations with direct, optimized assembly routines.

src/syscall · high confidence

Add module zip file creation and validation package

The vendored golang.org/x/mod/zip package is introduced to provide functions for creating and extracting module zip files. This adds support for enforcing specific constraints on module zip files, such as path prefixes, size limits (500 MiB for the zip, 16 MiB for go.mod and LICENSE files), and file type restrictions (no symlinks, no irregular files). Users benefit from consistent and validated module zip handling within the Go toolchain.

src/cmd/vendor/golang.org/x/mod/zip · high confidence

Add preprofile tool for PGO profile preprocessing

A new \go tool preprofile\ command is introduced to preprocess pprof profiles into an intermediate representation for use during Profile-Guided Optimization (PGO). This tool allows users to parse an input pprof file and write the transformed data to an output file or stdout, enabling the compiler to reuse this transformation across invocations rather than recomputing it each time.

src/cmd/preprofile · high confidence

Add runnable examples for text/scanner, text/tabwriter, and text/template

The standard library packages text/scanner, text/tabwriter, and text/template now include runnable example tests (Example functions) that demonstrate core usage patterns. For text/scanner, examples show basic tokenization, custom identifier rules via IsIdentRune, comment handling, and whitespace customization. For text/tabwriter, examples illustrate column alignment, elastic tabstops, and trailing tab behavior. For text/template, examples cover basic execution, block template redefinition, loading templates from files/globs, sharing helper templates, registering custom functions, and using conditional logic.

src/text · high confidence

Add s390x SSA backend support to the Go compiler

The Go compiler now includes a new SSA-based backend for the s390x (IBM Z) architecture. This change introduces the initial spill support and core code generation logic for s390x, enabling the compiler to generate optimized machine code for this platform using the modern SSA representation. This is a foundational step for s390x support in the Go toolchain, replacing or supplementing previous legacy backend mechanisms.

src/cmd/compile/internal/s390x · high confidence

Add s390x architecture support to the new linker

The s390x architecture is now supported by the new linker implementation. This change introduces the s390x-specific linker components (asm.go, l.go, obj.go) which handle architecture initialization, relocation processing, and assembly generation for the s390x platform, enabling Go binaries to be linked for IBM Z systems.

src/cmd/link/internal/s390x · high confidence

Add s390x instruction decoding and disassembly support

The vendored s390x architecture package now includes the core components required to decode and disassemble s390x machine code. This adds the instruction decoder, argument parsing logic, and instruction representation structures. It also introduces two distinct output formats for disassembly: a GNU-style format that supports extended mnemonics (e.g., converting generic branch instructions to specific conditional variants like 'jo' or 'je'), and a Plan 9-style Go syntax format that handles operand ordering and specific instruction translations (e.g., mapping load/store operations to MOV equivalents).

src/cmd/vendor/golang.org/x/arch/s390x · high confidence

Add slog checker to vet for structured logging validation

The Go vet tool now includes a new 'slog' analyzer that detects invalid calls to the log/slog package. It flags mismatched key-value pairs, such as non-string keys that are not slog.Attr, and reports calls where a final key is missing its corresponding value.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/slog · high confidence

Add weighted semaphore implementation for parallel formatting

The Go toolchain now includes a weighted semaphore implementation in the vendored x/sync package, enabling the gofmt command to format files in parallel by managing concurrent access to resources with specific weights.

src/cmd/vendor/golang.org/x/sync/semaphore · high confidence

Added 'go vet' slog checker and vendored 'bisect' tool

The Go toolchain now includes a new 'slog' checker in 'go vet' to help identify issues related to the standard library's structured logging package. Additionally, the 'bisect' command-line tool from golang.org/x/tools has been vendored into the repository, providing a utility for binary-searching through code changes to isolate the specific modifications that cause a test failure or regression.

src/cmd/vendor/golang.org/x/tools/cmd · high confidence

Added ARM instruction decoding and assembly syntax support

The vendored \golang.org/x/arch/arm/armasm\ package now includes the core files for decoding ARM instructions and formatting them into assembly syntax. This adds the ability to parse raw ARM binary encodings into structured instruction objects and output them in both GNU and Go (Plan 9) assembler formats, which is required for disassembling and analyzing ARM binaries.

src/cmd/vendor/golang.org/x/arch/arm · high confidence

Added AST edge traversal support in vendored x/tools

The vendored copy of golang.org/x/tools now includes the new go/ast/edge package, which provides a Kind-based API for identifying and accessing child nodes within Go AST structures. This addition enables more robust and type-safe traversal of AST relationships by exposing field-level metadata and accessor methods for node edges.

src/cmd/vendor/golang.org/x/tools/go/ast/edge · high confidence

Added PPC64 disassembly support via vendored golang.org/x/arch/ppc64/ppc64asm

The \cmd/vendor\ directory now includes the \golang.org/x/arch/ppc64/ppc64asm\ package, providing the core logic for decoding 64-bit PowerPC machine code. This addition introduces the \ppc64asm\ package with files for instruction decoding (\decode.go\, \field.go\), GNU and Plan 9 assembler syntax generation (\gnu.go\, \plan9.go\), and instruction tables (\tables.go\), enabling the \cmd/objdump\ tool to disassemble PPC64 binaries.

src/cmd/vendor/golang.org/x/arch/ppc64 · high confidence

Added bools analyzer to detect boolean operator mistakes

The vendored golang.org/x/tools now includes the 'bools' analysis pass, which detects common mistakes involving boolean operators. This new tool identifies redundant expressions (such as \x && x\ or \x \|\| x\) and suspect patterns (like \x != c1 \|\| x != c2\ where \c1\ and \c2\ are different constants, which are always true, or \x == c1 && x == c2\, which are always false).

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/bools · high confidence

Added cgocall analyzer to detect invalid cgo pointer passing

The vendored x/tools package now includes the cgocall analyzer, which detects violations of cgo pointer passing rules by warning when Go types with embedded pointers (such as channels, maps, functions, or slices) are passed to C code. The implementation includes version-specific build tags to handle Go 1.21's new types.Package.GoVersion API, ensuring compatibility across Go versions.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/cgocall · high confidence

Added ctrlflow analysis pass for control-flow graph construction

The vendored golang.org/x/tools now includes the ctrlflow analysis pass, which builds a syntactic control-flow graph (CFG) for function bodies. This pass does not report diagnostics itself but provides a result object allowing other analyzers to query whether a function cannot return normally (e.g., due to infinite loops or os.Exit calls) and to access the constructed CFGs for named functions and function literals.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow · high confidence

Added httpresponse static analysis check to detect unsafe HTTP response handling

The vendored golang.org/x/tools now includes the httpresponse analyzer, which detects a common mistake where developers defer closing an HTTP response body before checking for errors. This check helps prevent latent nil dereference bugs by flagging code patterns where resp.Body.Close() is deferred prior to verifying that the HTTP request succeeded.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/httpresponse · high confidence

Added internal flag and help handling for Go analysis tools

The vendored golang.org/x/tools package now includes the analysisflags internal package, introducing structured command-line flag parsing and help generation for static analysis checkers. This adds support for standard flags like -json, -fix, and -diff, along with per-analyzer enable/disable flags in multi-mode, and provides a Help function to display analyzer documentation and flag details to users.

src/cmd/vendor/golang.org/x/tools/go/analysis/internal · high confidence

Added internal telemetry counter subsystem

The vendored golang.org/x/telemetry package now includes a new internal counter subsystem (internal/counter and internal/mmap). This adds support for high-performance, lock-free atomic counters that persist data via memory-mapped files, including stack-based counters for detailed profiling and file rotation logic for periodic uploads. This infrastructure provides the low-level storage and counting mechanisms required by the broader telemetry system.

src/cmd/vendor/golang.org/x/telemetry/internal/counter · high confidence

Added lostcancel static analysis pass to detect context cancellation leaks

The Go vet tool now includes the 'lostcancel' analyzer, which checks for failures to call the cancellation function returned by context.WithCancel, WithTimeout, and WithDeadline. This change helps prevent context leaks by flagging code paths where the cancel function is discarded (e.g., assigned to the blank identifier) or not invoked before a function returns.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel · high confidence

Added nilfunc analyzer to detect useless function comparisons

The Go vet tool now includes the nilfunc analyzer, which detects useless comparisons between functions and nil (e.g., \f == nil\). This check helps identify code that is always true or false, as function values in Go cannot be compared for equality with nil in a meaningful way. Users running \go vet\ will now see warnings for such patterns, improving code correctness and clarity.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/nilfunc · high confidence

Added shift analysis pass to detect excessive bit shifts

The vendored golang.org/x/tools now includes the 'shift' analysis pass, which checks for shift operations (\<\<, \>\>, \<\<=, \>\>=) where the shift amount equals or exceeds the bit width of the integer type. This analyzer skips checks on unreachable code and ignores constant shifts, reporting errors when a variable shift might be too large for the underlying type's size.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/shift · high confidence

Added tamper-evident log implementation for go.sum database

The vendored x/mod package now includes the tlog package, which implements the tamper-evident log structure used by the Go module sum database. This addition introduces core types and functions for managing tree hashes, tile coordinates, and record formatting, enabling the Go toolchain to verify the integrity of module checksums using a Certificate Transparency-compatible log.

src/cmd/vendor/golang.org/x/mod/sumdb/tlog · high confidence

Added telemetry counter package for collecting usage metrics

The Go toolchain now includes a vendored \golang.org/x/telemetry/counter\ package, enabling the collection of public telemetry data via in-memory counters that are persisted to disk. This change introduces APIs for creating named counters (\New\, \NewStack\), incrementing them (\Inc\, \Add\), and initializing the telemetry system (\Open\, \OpenAndRotate\, \OpenDir\). It also provides utilities to automatically track command-line flags (\CountFlags\, \CountCommandLineFlags\), allowing the Go commands to record usage statistics for flags passed during execution.

src/cmd/vendor/golang.org/x/telemetry/counter · high confidence

Added tooling to rebuild the time zone database

The lib/time package now includes an update.bash script and a mkzip.go utility, allowing users to regenerate the zoneinfo.zip archive from the latest IANA Time Zone Database releases. This change provides a reproducible, automated workflow for keeping the library's time zone data current without manual intervention.

lib/time · high confidence

Added unitchecker package for single-unit static analysis

The vendored golang.org/x/tools now includes the unitchecker package, which provides a main function for analysis drivers that analyze a single compilation unit during a build. This tool supports the go vet protocol, allowing build systems to invoke static analysis on individual packages via configuration files, with support for flags, help, and fix/diff modes.

src/cmd/vendor/golang.org/x/tools/go/analysis/unitchecker · high confidence

Added unsafeptr static analysis check for invalid uintptr conversions

The Go vet tool now includes the unsafeptr analyzer, which detects invalid conversions of uintptr to unsafe.Pointer. This check helps prevent memory safety issues by flagging cases where a uintptr-typed word in memory holds a pointer value that becomes invisible to the garbage collector during stack copying, as well as unsafe pointer arithmetic and misuse of reflect headers.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unsafeptr · high confidence

Added unusedresult analyzer to detect discarded function results

The vendored golang.org/x/tools now includes the unusedresult analyzer, which checks for calls to pure functions whose results are ignored. This helps prevent bugs where return values from functions like fmt.Errorf, context.WithCancel, or various slices and maps operations are accidentally discarded. The analyzer can be configured via flags to specify additional functions or string methods whose results must be used.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unusedresult · high confidence

Added vendored bisect debugging support

The Go toolchain now includes the \golang.org/x/tools/internal/bisect\ package, allowing compilers and other programs to integrate with the \bisect\ debugging tool. This enables users to automatically determine which specific change in a set of independent modifications causes a failure by matching change patterns and reporting match markers.

src/cmd/vendor/golang.org/x/tools/internal/bisect · high confidence

Added vendored objectpath package for stable type object identification

The vendored copy of golang.org/x/tools now includes the go/types/objectpath package, which provides a naming scheme for types.Objects relative to their enclosing package. This allows the identity of type-checker objects to be serialized and sent between programs, establishing a correspondence between logically equivalent objects across different address spaces, which is essential for tools that need to track symbols across compilation units or export data.

src/cmd/vendor/golang.org/x/tools/go/types/objectpath · high confidence

Added vendored unreachable code analyzer

The vendored copy of golang.org/x/tools now includes the 'unreachable' analysis pass, which detects statements that can never be reached due to preceding returns, panics, or infinite loops. This enables tools like 'go vet' to identify and report dead code within function bodies.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unreachable · high confidence

Assembler documentation and entry point added

The \cmd/asm\ package now includes a \doc.go\ file that documents the command-line usage, flags (such as \-S\, \-V\, \-shared\, \-spectre\), and input language for the Go assembler. Additionally, \main.go\ provides the entry point for the assembler, handling flag parsing, architecture initialization, and the assembly process, including support for generating symbol ABIs and handling assembly errors by removing the output file on failure.

src/cmd/asm · high confidence

Centralized command-line flag parsing with GCC-compatible response file support

The Go toolchain now supports response files (arguments prefixed with '@') to bypass operating system command-line length limits, particularly on Windows. The \cmd/internal/objabi\ package introduces a new \ParseArgs\ function that implements GCC-compatible argument parsing rules, handling whitespace separation, single and double quotes, and escape sequences (including backslash-newline line continuations for both LF and CRLF). This functionality is exposed via the \Flagparse\ function, which expands response file arguments before standard flag parsing, allowing users to pass large numbers of arguments via external files without hitting shell or OS limits.

src/cmd/internal/objabi · high confidence

Compiler now supports AddressSanitizer (ASan) checks for global variables

The Go compiler now generates initialization code to register global variables with the AddressSanitizer runtime when the -asan flag is enabled. This ensures that global variables are properly instrumented and their memory ranges are registered for shadow memory checks at startup, improving the detection of memory errors in global state.

src/cmd/compile/internal/pkginit · high confidence

Compiler output now supports split compiler and linker object files

The Go compiler now supports writing the package object file in two separate parts: a compiler object (containing export data) and a linker object (containing symbol and relocation data). This is controlled by the new -linkobj flag, which specifies the path for the linker object file, while the standard -o output becomes the compiler object. This split allows distributed build systems to send only the necessary data to future compilation steps or linking steps, improving efficiency. The implementation in src/cmd/compile/internal/gc/obj.go handles the creation of these distinct archive entries (\\ .PKGDEF and \go\.o) and manages the export notification via file descriptors when applicable.

src/cmd/compile/internal/gc · high confidence

Crash monitoring now reports telemetry data for Go runtime crashes

The Go toolchain now includes a crash monitor that detects when a Go program crashes and reports the crash details to telemetry. This feature captures the stack trace of the crashing goroutine, converts it into a telemetry counter name, and sends the count to the telemetry system. If the crash report cannot be parsed, it is saved to a temporary file for later investigation. This change enhances the Go toolchain's ability to collect crash data for improving the language and its ecosystem.

src/cmd/vendor/golang.org/x/telemetry/internal/crashmonitor · high confidence

Enable timeformat analyzer in go vet

The go vet tool now includes the timeformat analyzer, which detects calls to time.Format or time.Parse that use the incorrect 2006-02-01 (yyyy-dd-mm) date layout. This change helps prevent common mistakes where developers intend to use the standard 2006-01-02 (yyyy-mm-dd) format, and the analyzer provides suggested fixes to replace the bad format with the correct one.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat · high confidence

Go 1.23 introduces iterators and new standard library packages

The Go standard library now includes the \iter\ package, exposing fundamental iterator types to enable range-over-func capabilities. This change is accompanied by the addition of several new packages: \slices\ for slice manipulation, \maps\ for map operations, \constraints\ for generic type constraints, \uuid\ for UUID generation, and \plugin\ for dynamic plugin loading. These additions provide new standard library tools for functional-style iteration and data structure management.

src/go · high confidence

Go compiler documentation and testing infrastructure introduced

The Go compiler now includes a comprehensive README detailing its internal architecture (parsing, type checking, IR construction, SSA generation, and code emission), alongside a formal ABI specification document. A new command-line help system (doc.go) documents available flags, and a script-based testing framework (script\_test.go) has been added to validate compiler behavior. These changes provide clearer guidance for contributors and more robust verification of compiler functionality.

src/cmd/compile · high confidence

Go telemetry now collects detailed platform, mode, and experiment metrics

The Go toolchain now reports richer telemetry data to help improve future releases. This change adds counters for the build mode (module, workspace, or GOPATH), whether CGO is enabled, and specific target architecture variants (such as GO386, GOAMD64, GOARM, etc.). It also tracks enabled Go experiments and, on supported platforms, collects the host OS version (major/minor on Unix, major/minor/build on Windows) to better understand the environments in which Go is used.

src/cmd/go/internal/telemetrystats · high confidence

Hardware-accelerated math functions for s390x

The \math\ package now provides optimized assembly implementations for the s390x architecture, significantly improving performance for trigonometric, hyperbolic, and logarithmic functions. This change introduces architecture-specific code paths for functions including \Acos\, \Acosh\, \Asin\, \Asinh\, \Cos\, \Cosh\, \Sin\, \Sinh\, \Tan\, \Tanh\, \Log\, \Log10\, \Log1p\, \Atan\, \Atan2\, \Cbrt\, and \Expm1\. The implementation utilizes the s390x vector facility (VX) where available to accelerate these calculations, while maintaining pure-Go fallbacks for compatibility.

src/math · high confidence

Hash functions now support state serialization and cloning

The hash implementations in the standard library (adler32, crc32, crc64, fnv) now implement the encoding.BinaryMarshaler, encoding.BinaryUnmarshaler, and encoding.BinaryAppender interfaces, allowing users to save and restore the internal state of a hash computation. Additionally, a new Cloner interface is implemented, enabling users to duplicate a hash state without re-initializing it, which is useful for parallel processing or checkpointing.

src/hash · high confidence

Initial 386 SSA backend implementation

The Go compiler now supports generating code for the 386 architecture using the new SSA (Static Single Assignment) backend. This change introduces the core 386-specific code generation logic in \src/cmd/compile/internal/x86\, including instruction selection for arithmetic, memory operations, and floating-point math, as well as handling for the \GO386\ environment variable to select between SSE2 and soft-float modes. This replaces the legacy backend for 386, enabling 32-bit x86 to benefit from the optimizations and correctness improvements of the SSA-based compiler.

src/cmd/compile/internal/x86 · high confidence

Initial ARM backend implementation for the SSA compiler

The Go compiler now supports generating code for the ARM architecture via the new SSA backend. This change introduces the \src/cmd/compile/internal/arm\ package, which provides the necessary infrastructure to translate SSA IR into ARM assembly. Key capabilities include handling register allocation, generating load/store instructions for various data types (including floating-point), implementing shift operations, and optimizing specific ARM instructions like bit-field clear (BFC). This enables Go programs to be compiled and run on 32-bit ARM devices using the modern SSA-based compiler pipeline.

src/cmd/compile/internal/arm · high confidence

Initial MIPS and MIPS64 linker support

The Go linker now supports the MIPS and MIPS64 architectures (GOARCH=mips and mipsle). This change introduces the architecture-specific linker implementation in src/cmd/link/internal/mips, including ELF relocation handling, symbol resolution, and dynamic linking setup for Linux (glibc and musl). Users can now build and link Go binaries for MIPS-based systems.

src/cmd/link/internal/mips · high confidence

Initial SSA backend configuration for PPC64

The Go compiler now supports the SSA (Static Single Assignment) backend for the PPC64 architecture. This change introduces the initial configuration and code generation logic for PPC64, including support for load/store operations by type, shifts, divisions, and boolean operations. It also adds spill support, handles 64-bit addresses for AIX, and implements intrinsics for trunc, floor, ceil, and other math functions. This enables the use of the new SSA-based compiler infrastructure for PPC64 targets, improving code generation quality and maintainability.

src/cmd/compile/internal/ppc64 · high confidence

Initial compiler support for the RISC-V 64-bit (riscv64) architecture

The Go compiler now supports generating code for the RISC-V 64-bit architecture. This change introduces the core compiler backend in the \src/cmd/compile/internal/riscv64\ package, including the initialization logic (\galign.go\), instruction generation (\ggen.go\), subroutines (\gsubr.go\), and the SSA (Static Single Assignment) code generation engine (\ssa.go\). This enables the Go toolchain to compile programs for riscv64 targets.

src/cmd/compile/internal/riscv64 · high confidence

Initial implementation of the LoongArch64 (loong64) backend in the Go compiler

The Go compiler now supports the LoongArch64 architecture. This change introduces the core backend components in src/cmd/compile/internal/loong64, including the initialization logic (Init), SSA value and block generation (ssaGenValue, ssaGenBlock), and specific instruction handling for memory operations, arithmetic, and floating-point math. This enables the Go toolchain to compile and run programs on LoongArch64 hardware.

src/cmd/compile/internal/loong64 · high confidence

Initial linker support for LoongArch (loong64) architecture

The Go toolchain now includes the internal linker implementation for the LoongArch (loong64) architecture, enabling the building of binaries for this platform. This change introduces the core assembly emission, relocation handling, and architecture initialization logic specific to Loong64, including support for dynamic linking against glibc and musl, PLT/GOT relocations, and function alignment requirements.

src/cmd/link/internal/loong64 · high confidence

Initial linker support for RISCV64 architecture

The Go linker now supports the RISCV64 architecture, enabling the creation of executables for this platform. This change introduces the core linker infrastructure for RISCV64, including architecture initialization, ELF file generation, and relocation handling. It adds support for external linking on Linux, FreeBSD, and OpenBSD, implements necessary relocations (such as PCREL, GOT, and CALL trampolines), and configures the correct dynamic linker paths for these operating systems.

src/cmd/link/internal/riscv64 · high confidence

Introduce 'go fmt' command with module awareness and error resilience

The 'go fmt' command is now available, implemented in the new fmtcmd package. It runs gofmt on specified packages while respecting the -mod flag to control module download modes. The command intelligently skips formatting packages in dependency modules and ignores specific errors like missing embedded files or empty packages, preventing crashes on invalid input.

src/cmd/go/internal/fmtcmd · high confidence

Introduce 'go generate' command with -run and -skip flags

The 'go generate' command is now available for processing source files to create or update Go source files via directives. It supports filtering directives with the new -run (include) and -skip (exclude) flags, which accept regular expressions to match directive text. The command sets environment variables like $GOFILE, $GOPACKAGE, and $GOROOT for generators, and places $GOROOT/bin at the beginning of the PATH to ensure consistent tool usage. It also sets the 'generate' build tag to allow generated files to be ignored during normal builds.

src/cmd/go/internal/generate · high confidence

Introduce 'go tool pprof' command with readline support and Go-based object handling

The Go distribution now includes the 'go tool pprof' command, providing a built-in interface for visualizing and analyzing CPU, memory, and other profiles generated by Go programs. This tool is a vendored copy of the upstream Google pprof project, adapted for Go-specific use cases. Key user-facing features include an interactive readline-based UI for command-line interaction (disabled in dumb terminals), a Go-native object file handler that uses DWARF information for symbol resolution and disassembly (reducing reliance on external tools like GNU binutils), and improved error handling that exits with non-zero status codes on failures. The tool also supports fetching profiles over HTTP with configurable timeouts and respects environment proxies.

src/cmd/pprof · high confidence

Introduce //go:embed for embedding files at compile time

The new embed package allows Go programs to include static files directly into the binary at compile time using the //go:embed directive. Developers can now bind files to string, \[\]byte, or FS variables, enabling seamless integration of assets like HTML templates, images, or configuration files into web servers and other applications without external dependencies or runtime file system access.

src/embed · high confidence

Introduce GOAUTH environment variable for configurable HTTP authentication

The \go\ command now supports a new \GOAUTH\ environment variable that allows users to configure how HTTP authentication credentials are retrieved for HTTPS requests. This mechanism supports three modes: \off\ to disable authentication, \netrc\ to read credentials from the standard \.netrc\ (or \\_netrc\ on Windows) file, and \git\ to use the \git credential\ helper for a specified working directory. Users can also provide custom shell commands via \GOAUTH\ to implement their own authentication logic. The implementation includes a credential cache to avoid repeated lookups and handles URL prefix matching, including support for URLs with query parameters.

src/cmd/go/internal/auth · high confidence

Introduce GOCACHEPROG protocol definition package

The Go command now exposes the \cacheprog\ package, which defines the JSON-based protocol for the \GOCACHEPROG\ environment variable. This allows users to configure an external build cache by implementing a subprocess that communicates with the Go command via stdin/stdout. The package specifies the \Request\ and \Response\ structures, including commands for storing (\put\) and retrieving (\get\) cache objects, handling cache misses, and managing disk paths for cached bodies, enabling custom cache policies outside the default file-system storage.

src/cmd/go/internal/cacheprog · high confidence

Introduce GOFIPS140 build setting with snapshot support and integrity verification

The go command now supports the GOFIPS140 build setting, allowing users to build binaries that default to FIPS-140 mode or substitute the in-tree crypto implementation with a certified or in-process snapshot from GOROOT/lib/fips140. When a snapshot is selected, the build system verifies the SHA-256 hash of the snapshot zip file against a known sum file before unpacking it, ensuring integrity. The build also enforces mutual exclusivity: FIPS-140 mode cannot be used with the purego build tag or the GOEXPERIMENT=boringcrypto setting.

src/cmd/go/internal/fips140 · high confidence

Introduce Midway SIMD translation pass in the compiler

The Go compiler now includes a new 'Midway' transformation pass that rewrites code using the generic \simd\ package into architecture-specific implementations. This pass analyzes dependencies on SIMD types, generates specialized variants for supported vector sizes (such as 128, 256, and 512 bits on amd64), and creates dispatch logic to select the appropriate implementation at runtime. It also handles renaming of dependent types and variables to ensure correct type checking and export data generation.

src/cmd/compile/internal/midway · high confidence

Introduce SIMD code generator toolchain and reference implementation

The \src/simd/archsimd/\_gen\ directory now contains the complete toolchain for generating Go SIMD APIs and compiler backends. This includes \simdgen\ for producing architecture-specific code (amd64, arm64 NEON, SVE, wasm), \midway\ for computing the portable API intersection, and \refgen\ for generating a reference implementation from the \internal/spec\ definition. The tooling also provides shared utilities (\gentools\), instruction data fetchers (\fetch-xed.sh\, \fetch-arm64.sh\), and debugging commands (\specls\) to support the new specification-driven SIMD development workflow.

src/simd · high confidence

Introduce Unified IR (UIR) export data format and noder package

The compiler now uses a new Unified IR (UIR) format to serialize package export data, replacing the legacy format. This change introduces the \cmd/compile/internal/noder\ package, which provides the writer and reader implementations for this binary format. The UIR format is designed to propagate bodies of generic and/or inlined functions between compilation units, supporting features like method indices and dictionary encoding for generics. The format includes sections for strings, metadata, positions, packages, types, objects, and bodies, with versioning to ensure backward compatibility for readers.

src/cmd/compile/internal/noder · high confidence

Introduce \`go tool covdata\` for manipulating second-generation coverage data

Adds the \covdata\ command-line tool, accessible via \go tool covdata\, to read, merge, subtract, intersect, and report on coverage data files produced by the new second-generation coverage instrumentation. The tool supports subcommands such as \merge\ (combining data from multiple runs or programs), \subtract\ and \intersect\ (comparing coverage sets), \percent\ (reporting statement coverage percentages), \func\ (listing coverage per function), \pkglist\ (listing profiled packages), \textfmt\ (converting to legacy text format for \go cover\), and \debugdump\ (for debugging internal data structures). It also introduces a relaxed mode-clash policy for reporting operations to allow merging data from different counter modes.

src/cmd/covdata · high confidence

Introduce bio package with seekable buffered I/O and mmap-backed reading

The new internal bio package provides seekable buffered Reader and Writer types that wrap standard file descriptors, offering methods like MustSeek, Offset, and Close for toolchain I/O operations. On Unix systems, the Reader can back large data reads with read-only memory-mapped regions via Slice and SliceRO, falling back to heap allocation when mmap limits are reached or on non-Unix platforms.

src/cmd/internal/bio · high confidence

Introduce build artifact cache with configurable backends

The Go toolchain now includes a build artifact cache to store and reuse compiled packages, significantly speeding up subsequent builds. This change introduces the \cmd/go/internal/cache\ package, which implements a disk-based cache using content-addressable storage (SHA256 hashes) and supports an external caching program via the \GOCACHEPROG\ environment variable. The cache location defaults to the system's user cache directory (e.g., \\~/.cache/go-build\ on Linux) and can be customized or disabled via the \GOCACHE\ environment variable. Debugging and verification modes are available through \GODEBUG\ settings like \gocacheverify\ and \gocachehash\.

src/cmd/go/internal/cache · high confidence

Introduce compiler-agnostic PGO profile handling package

The \src/cmd/internal/pgo\ package now provides the core logic for Profile-Guided Optimization (PGO) that is shared between the compiler and the preprofile tool. It introduces a custom intermediate serialization format (header "GO PREPROFILE V1") to allow the preprofile tool to parse pprof profiles once and let the compiler parse the lightweight serialized output. The package includes functions to parse standard pprof profiles (\FromPProf\), serialize/deserialize the processed edge map (\WriteTo\/\FromSerialized\), and handles edge cases such as empty profiles or missing \Function.start\_line\ data.

src/cmd/internal/pgo · high confidence

Introduce dynamic Go toolchain switching

The Go tool now automatically detects when a project requires a newer Go version than the one currently installed and switches to a compatible toolchain. This is controlled by the GOTOOLCHAIN environment variable (supporting modes like 'auto' and 'path') and the 'toolchain' directive in go.mod. The implementation in src/cmd/go/internal/toolchain handles downloading the required toolchain, managing the switch process, and ensuring the correct version is used for subsequent commands.

src/cmd/go/internal/toolchain · high confidence

Introduce go tool objdump for binary disassembly

The \go tool objdump\ command is now available to disassemble executable files. It prints the disassembly of all text symbols in a binary, or a specific address range when start and end addresses are provided. The tool supports filtering by symbol name via the \-s\ flag, printing Go source code alongside assembly with \-S\, and displaying GNU-style assembly syntax where supported via \-gnu\. It handles various object file formats including ELF, PE, and Plan 9 a.out, and supports multiple architectures such as x86, ARM, ARM64, PPC64, and Loong64.

src/cmd/objdump · high confidence

Introduce go tool test2json for converting test output to JSON

Adds the \go tool test2json\ command, which converts \go test\ output into a machine-readable JSON stream. This tool allows users to parse test results programmatically, supporting features like package filtering (\-p\), timestamp inclusion (\-t\), and direct execution of test binaries. It is designed to work with \go test -json\ for live updates and handles signal management to ensure clean output during test execution.

src/cmd/test2json · high confidence

Introduce internal advisory file-locking library for cmd/go

The cmd/go tool now includes an internal package (cmd/go/internal/lockedfile/internal/filelock) that provides a platform-independent API for advisory file locking. This library abstracts away platform-specific system calls—using flock on Unix-like systems, fcntl locks on AIX and Solaris (with a retry loop to handle spurious EDEADLK errors), and Windows file locking APIs—allowing cmd/go to safely manage concurrent access to files across different operating systems.

src/cmd/go/internal/lockedfile/internal · high confidence

Introduce internal mmap package for efficient index file reading

The Go toolchain now uses a new internal \mmap\ package to read module index files, replacing previous methods with memory-mapped I/O on supported platforms (Unix, Windows) to improve performance and reduce file descriptor usage. On platforms without mmap support (js/wasm, wasip1, Plan 9), the package falls back to reading the entire file into memory. This change includes platform-specific implementations that handle file size constraints and Windows-specific mapping behaviors, along with tests to ensure data integrity.

src/cmd/go/internal/mmap · high confidence

Introduce internal osinfo package for OS version detection

The new internal/osinfo package provides a unified Version() function to detect and return the operating system version across supported platforms. It implements platform-specific logic: using Windows APIs for Windows, sysctl calls for BSD/macOS, uname for Linux/AIX/Solaris, reading /dev/osversion for Plan9, and detecting the Node.js runtime version for WebAssembly (js/wasm). This standardizes how the Go toolchain reports OS metadata, which is primarily used by the build system and dist tool for logging and diagnostics.

src/cmd/internal/osinfo · high confidence

Introduce per-package compiler and linker flags

The go command now supports specifying different effective flags for different packages via the -asmflags, -gcflags, -ldflags, and -gccgoflags command-line options. Users can use the \<pattern\>=\<flags\> syntax to target specific packages (e.g., -gcflags=net=-S) or use relative path patterns (e.g., -gcflags=./...=-S) to apply flags to packages in specific directories. This allows for more granular control over the build process, enabling users to apply specific compiler or linker flags to only the packages that need them.

src/cmd/go/internal/load · high confidence

Introduce range-over-func support in the Go compiler

The Go compiler now supports the range-over-func language feature, allowing iteration over custom iterator functions using the range keyword. This change adds the rangefunc package to the compiler's internal logic, which rewrites range-over-func loops into standard function calls with yield callbacks. The implementation includes comprehensive benchmark tests to ensure performance parity with traditional loops and extensive unit tests to verify correct behavior, including handling of break/continue, return statements, and iterator state checking to prevent misuse.

src/cmd/compile/internal/rangefunc · high confidence

Introduce test2json package for converting test output to JSON

The new \src/cmd/internal/test2json\ package provides the core logic for converting Go test binary output into a structured JSON stream. It handles parsing test directives (such as RUN, PASS, FAIL), attributes output to the correct test context, and supports framing markers to distinguish between standard output, error output, and test metadata. This component is used by \cmd/test2json\ and \cmd/go\ to enable machine-readable test reporting, including support for subtests, benchmark output, and build failure attribution.

src/cmd/internal/test2json · high confidence

Introduce the 'go work' command suite for workspace management

The Go toolchain now includes a dedicated 'go work' command group to manage multi-module workspaces defined by a go.work file. This change introduces five new subcommands: 'go work init' to create a new workspace file, 'go work use' to add or remove module directories from the workspace, 'go work edit' to programmatically modify the go.work file (supporting flags for go version, toolchain, godebug, use, and replace directives), 'go work sync' to align workspace module versions with the minimal build list, and 'go work vendor' to create a vendored copy of dependencies for the entire workspace. These commands provide the foundational interface for workspace maintenance, allowing users to define, synchronize, and manage sets of local modules.

src/cmd/go/internal/workcmd · high confidence

Introduce the iter package with Seq, Seq2, Pull, and Pull2

The new iter package provides foundational iterator types (Seq and Seq2) and Pull/Pull2 functions that allow consumers to retrieve values from a sequence one at a time instead of using a range loop. This enables more flexible iteration patterns, such as merging multiple sorted sequences or reading only a subset of a stream, while ensuring proper cleanup via the stop function.

src/iter · high confidence

Introduce the plugin package for dynamic loading of Go plugins

Adds the new \plugin\ package, enabling Go applications to dynamically load and resolve symbols from Go plugins (shared libraries built with \-buildmode=plugin\). The implementation supports Linux, FreeBSD, and macOS (when CGO is enabled) via \dlopen\/\dlsym\, while providing stubs for unsupported platforms. It exposes \Open\ to load a plugin and \Lookup\ to access exported functions and variables, with built-in concurrency safety and initialization handling. The package documentation highlights significant limitations, including poor race detector support, strict toolchain consistency requirements, and potential security risks from loading untrusted libraries.

src/plugin · high confidence

Introduce the unique package for value interning

The new \unique\ package provides facilities for canonicalizing comparable values, allowing applications to create globally unique handles for values of any comparable type. By using \unique.Make\, identical values are interned into a single canonical instance, enabling efficient identity-based comparisons via \Handle\ equality checks. The implementation uses a type-specific concurrent map and automatically reclaims canonical entries when they are no longer referenced, ensuring that large underlying values (such as strings) do not leak memory.

src/unique · high confidence

Introduce virtual file system with overlay and bind-mount support

The go command now uses a new internal virtual file system (fsys) to manage file access, enabling editor integration through the -overlay flag. This allows the go command to read source files from temporary, unsaved locations by mapping paths to actual files via a JSON overlay configuration. The implementation also supports bind mounts (Bind) to redirect directory reads and provides overlay-aware Glob and WalkDir operations, ensuring that file tree traversal and pattern matching respect these virtual mappings.

src/cmd/go/internal/fsys · high confidence

Introduce weak package for safe weak references

The new \weak\ package provides \Pointer\[T\]\, a type that allows referencing values without preventing their garbage collection. Users can create weak references via \weak.Make\, and calling \Value()\ returns the original pointer if the object is still reachable, or \nil\ if it has been reclaimed. This enables use cases like caches and canonicalization maps where references should not keep objects alive. The implementation ensures that weak pointers become nil when the target is unreachable or when a finalizer/cleanup function is queued, and equality semantics are based on the original pointer and offset.

src/weak · high confidence

Introduces error wrapping, Is, As, and Join functions

The errors package now supports error wrapping via the Unwrap method, allowing errors to be composed into a tree. Users can inspect this tree using the new Is function to check if an error matches a target (including custom Is methods) and the As function to extract specific error types from the chain. Additionally, the Join function enables combining multiple errors into a single wrapped error, which formats as a concatenation of the individual error messages.

src/errors · high confidence

Introduction of structured logging with slog and enhanced standard log capabilities

The \log\ package now exposes a \Default()\ function to retrieve the standard logger and adds an \Output\ method to \Logger\ for custom call-depth logging, alongside new flags \LUTC\ and \Lmsgprefix\ for controlling time zones and prefix placement. A new \log/slog\ package provides structured logging with key-value attributes, supporting text and JSON output via \TextHandler\ and \JSONHandler\, as well as advanced features like \MultiHandler\ for dual-output, \DiscardHandler\ for silent logging, and \LogValuer\ for custom value serialization. The \slog\ package integrates with the standard \log\ package, allowing \slog\ records to be routed through the standard logger via \SetLogLoggerLevel\.

src/log · high confidence

Introduction of the 'go fix' command

The 'go fix' command is now available to automatically update Go programs that use deprecated language features or library APIs to their modern equivalents. This tool helps users migrate their codebases after upgrading to a new Go release by applying necessary rewrites. It is implemented as a wrapper around the analysis suite from golang.org/x/tools, allowing for extensible fixers via the analysis framework.

src/cmd/fix · high confidence

Introduction of the html and html/template packages

The Go standard library now includes the \html\ package for escaping and unescaping HTML text, and the \html/template\ package for parsing and executing HTML templates with automatic context-aware escaping. The \html\ package provides \EscapeString\ and \UnescapeString\ functions that handle named entities, numeric entities, and Windows-1252 replacements. The \html/template\ package introduces typed content types (CSS, HTML, JS, URL, etc.) to ensure safe output in different contexts, preventing injection attacks by escaping or validating data based on where it appears in the HTML structure (e.g., inside a script tag, attribute, or style block).

src/html · high confidence

Introduction of the image/color and image/draw packages

The Go standard library now includes the \image/color\ and \image/draw\ packages, providing a comprehensive color model system and image composition capabilities. The \image/color\ package defines the \Color\ interface with \RGBA()\ methods returning 16-bit alpha-premultiplied values, along with concrete types like \RGBA\, \NRGBA\, \Gray\, \YCbCr\, and \CMYK\, and includes optimized conversion functions such as \RGBToYCbCr\ and \YCbCrToRGB\. The \image/draw\ package offers functions like \Draw\ and \DrawMask\ for Porter-Duff compositing, featuring fast paths for various source and destination types (e.g., \\*image.RGBA\, \\*image.Gray\) and a \FloydSteinberg\ drawer for error-diffusion dithering. Additionally, the \image/color/palette\ package provides standard color palettes like \Plan9\ and \WebSafe\.

src/image · high confidence

Introduction of the shared DWARF debugging information package

The Go toolchain now includes a new shared package, cmd/internal/dwarf, which centralizes the generation of DWARF debugging information previously split between the compiler and the linker. This package provides the core data structures for DWARF entries, including definitions for tags (such as DW\_TAG\_subprogram and DW\_TAG\_variable) and attributes (such as DW\_AT\_location and DW\_AT\_name), as well as logic for managing lexical scopes, PC ranges, and inlined function calls. It also introduces a code-generation test to ensure that the DWARF abbreviation tables remain synchronized with the variable emission logic, ensuring consistent and accurate debug data for developers.

src/cmd/internal/dwarf · high confidence

MIPS64 backend now uses the SSA compiler

The Go compiler for MIPS64 and MIPS64LE has switched from the legacy backend to the new SSA-based backend. This change introduces new internal files (galign.go, ggen.go, ssa.go) that implement the architecture-specific code generation logic, including support for soft-float, optimized zero-range operations, and specific instruction selection for loads, stores, and arithmetic. Users benefit from improved compilation performance and consistency with other modern architectures, as the MIPS64 port is now aligned with the compiler's unified SSA infrastructure.

src/cmd/compile/internal/mips64 · high confidence

New 'assign' analyzer detects useless self-assignments

The vendored Go tools now include the 'assign' static analysis checker, which identifies and suggests the removal of redundant self-assignments (such as \x = x\ or \a\[i\] = a\[i\]\). This new diagnostic helps users clean up code by flagging assignments where the left-hand and right-hand sides are identical, treating them as likely mistakes or unnecessary operations.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/assign · high confidence

New 'composites' analyzer detects unkeyed struct literals from external packages

The Go vet tool now includes the 'composites' analyzer, which flags composite literals of struct types imported from other packages that use positional (unkeyed) field syntax. This change improves code safety by warning against fragile patterns that break when the external struct definition changes, and it offers automatic fixes to insert field names for exported fields. Literals for structs defined in the same package, as well as specific standard library types known to be stable (such as image/color types), are excluded from this check.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/composite · high confidence

New 'defers' vet check for time.Since misuse

The Go vet tool now includes a new 'defers' analysis pass that detects a common mistake where time.Since is called directly inside a defer statement (e.g., defer recordLatency(time.Since(start))). This pattern results in the timestamp being captured at the time the defer statement is executed, rather than when the deferred function actually runs. The analyzer reports an error for such cases, guiding users to wrap the call in a closure (e.g., defer func() { recordLatency(time.Since(start)) }()) to ensure the correct timing.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/defers · high confidence

New 'ifaceassert' vet check detects impossible interface assertions

The Go vet tool now includes the 'ifaceassert' analyzer, which flags type assertions and type-switch cases where the static type of the value is an interface that cannot possibly implement the target interface. This occurs when the interfaces share method names but have conflicting signatures, allowing the tool to catch logic errors that would otherwise result in a runtime panic.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/ifaceassert · high confidence

New 'modernize' analyzer suite for automated code simplification

The vendored golang.org/x/tools package now includes the 'modernize' analyzer suite, which provides automated fixes for several common Go code patterns. This suite introduces analyzers to replace 'interface{}' with 'any' (Go 1.18+), update benchmark loops from 'for range b.N' to 'b.Loop()' (Go 1.24+), remove redundant loop variable redeclarations (Go 1.22+), and simplify 'errors.As' usage with 'errors.AsType' (Go 1.26+). It also includes fixes for replacing '\[\]byte(fmt.Sprintf(...))' with 'fmt.Appendf', simplifying composite literals with embedded fields (Go 1.27+), and replacing primitive 'sync/atomic' functions with strongly typed atomic types.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/modernize · high confidence

New -json flag for compiler optimization diagnostics

The Go compiler now supports a -json flag that outputs optimization decisions and missed opportunities as structured JSON logs. This feature enables IDEs and language servers to surface detailed compiler insights, such as why a function was not inlined or why a bounds check was inserted, directly in the editor. The logs follow the LSP Diagnostic format, allowing tools to display specific reasons for optimization choices alongside the source code.

src/cmd/compile/internal/logopt · high confidence

New AfterFunc API for scheduling functions on context cancellation

The context package now includes an AfterFunc function that allows users to schedule a function to run when a context is canceled. This provides a mechanism for asynchronous cleanup or notification tied to context lifecycle, similar to time.AfterFunc but triggered by cancellation instead of a timer. The implementation includes support for custom context types to register these functions, and ensures proper cleanup when contexts are canceled or when the scheduled function is stopped.

src/context · high confidence

New GC program encoder package

The new gcprog package provides an encoder for packed GC pointer bitmaps (GC programs) using a simple Lempel-Ziv style encoding. This allows the Go compiler to efficiently describe object memory layouts by emitting literal bits and repeating patterns, which is used to optimize garbage collection pointer maps.

src/cmd/internal/gcprog · high confidence

New Go assembler implementation with comprehensive testing

The Go assembler has been rewritten from scratch in the cmd/asm/internal/asm package, replacing the previous implementation. This new parser and instruction generator supports multiple architectures (amd64, 386, arm, arm64, ppc64, mips, mips64, loong64, s390x, riscv64) and includes extensive test coverage: end-to-end tests that verify assembly output against golden files, operand parsing tests for each architecture, expression evaluation tests, and bad instruction/operand tests to ensure proper error reporting.

src/cmd/asm/internal/asm · high confidence

New Mercurial extension for remote repository state verification

A new Mercurial extension, \goreposum.py\, is added to the library to support the \-reuse\ flag for Mercurial repositories. This extension introduces two commands: \goreposum\, which computes a conservative checksum of the remote repository's state (including branch heads, bookmarks, and tags) to detect changes without re-cloning, and \golookup\, which validates that a specific reference (such as a tag or branch name) still exists and resolves to the expected hash on the server.

lib/hg · high confidence

New alias analysis enables stack allocation of non-aliased slice backing stores

The escape analysis package has been refactored into multiple files and now includes a new alias analysis pass. This pass identifies slices that are proven to be unaliased during their lifetime (such as those used in simple append loops) and allows the compiler to free their backing arrays on the stack after the last use, rather than forcing them to escape to the heap. This change improves memory efficiency for code patterns involving frequent slice appends without external references.

src/cmd/compile/internal/escape · high confidence

New buffered text-editing utility for byte slices

A new internal package, src/cmd/internal/edit, has been added to support buffered, position-based editing of byte slices. This utility allows users to queue insert, delete, and replace operations on text data and apply them in a single pass, ensuring correct ordering and overlap detection. This change supports the cmd/cover tool's shift from AST-based modification to direct source text editing.

src/cmd/internal/edit · high confidence

New build and test infrastructure scripts for Go 1.26.0

The Go source tree now includes a comprehensive set of new build and test scripts (make.bash, make.bat, make.rc, run.bash, run.bat, run.rc, all.bash, all.bat, all.rc, clean.bash, clean.bat, clean.rc, bootstrap.bash, buildall.bash, race.bash, race.bat, cmp.bash) and documentation (README.vendor, cmd/README.vendor) to support the Go 1.26.0 release cycle. These scripts manage the build process, requiring a Go 1.26.0 bootstrap toolchain, and handle testing, cleaning, and vendor management for the standard library and commands. Additionally, a new vendored utility package, golang.org/x/tools/internal/moremaps, is added to provide helper functions for map operations.

src · high confidence

New buildid package for reading and rewriting build IDs

The Go toolchain now includes a dedicated \cmd/internal/buildid\ package to handle build ID operations. This package provides functions to read build IDs from various binary formats (ELF, Mach-O, PE, and archives) and to rewrite them. It specifically excludes host-specific identifiers (GNU build ID, Mach-O UUID) and Mach-O code signatures from the hash calculation to prevent convergence issues and ensure Apple notarization compatibility. The implementation also includes robust handling for edge cases, such as ELF files with zero alignment fields, and supports base64-encoded test data to avoid false positives from Apple's notarization service.

src/cmd/internal/buildid · high confidence

New buildid tool for displaying and rewriting build IDs

A new standalone tool, accessible via \go tool buildid\, has been added to display or rewrite the build ID stored in Go binaries. When invoked without flags, it prints the current build ID; with the \-w\ flag, it rewrites the build ID to accurately record a content hash of the file. The tool explicitly rejects legacy build ID formats (those without a slash, typical of Go 1.7 and earlier) to ensure compatibility with the new hashing algorithm.

src/cmd/buildid · high confidence

New closingMutex and expanded driver interfaces for safer concurrency and session management

The database/sql package introduces a new closingMutex type that prioritizes read locks over write locks, allowing concurrent reads while safely handling close operations without starving writers. This change is accompanied by significant updates to the driver package interfaces: drivers can now implement SessionResetter to reset connection state before reuse, Validator to check connection health, and NamedValueChecker to support custom argument types and per-query options. Additionally, the sql package now supports scanning into UUID types and provides new Null wrapper types for safer handling of nullable database values.

src/database · high confidence

New cmp package for comparing ordered values

The new \cmp\ package provides generic functions for comparing ordered types, including \Compare\ and \Less\. \Compare\ returns -1, 0, or +1 to indicate ordering, handling NaN values consistently (NaN is considered equal to NaN and less than any non-NaN). \Less\ reports whether x is less than y, also treating NaN as less than non-NaN. The package also includes \Or\, which returns the first non-zero argument from a variadic list, useful for fallback logic. The \Ordered\ type constraint covers integers, floats, strings, and uintptrs.

src/cmp · high confidence

New compiler package for sharing type information with the runtime

The compiler now includes a new \rttype\ package that translates host machine type information into target machine types for the runtime, handling layout differences such as 64-bit to 32-bit conversions. This package defines structures for all Go types (e.g., struct, interface, map) and provides mechanisms to generate interface tables (itabs) and handle type switches/asserts, ensuring the compiled program's runtime type descriptors are correctly aligned with the target architecture.

src/cmd/compile/internal/rttype · high confidence

New dead locals optimization pass in the Go compiler

The Go compiler now includes a new 'deadlocals' pass that removes assignments to local variables that are never read. This optimization reduces unnecessary write operations in generated code, potentially improving performance and reducing binary size for programs with unused variable assignments. The pass is integrated into the compilation pipeline and can be disabled via the -N flag or the NoDeadLocals debug flag.

src/cmd/compile/internal/deadlocals · high confidence

New debug/buildinfo package for reading Go binary metadata

A new \debug/buildinfo\ package has been added to the standard library, providing \Read\ and \ReadFile\ functions to extract build information (such as the Go toolchain version and module details) embedded in Go executables. The implementation supports multiple binary formats (ELF, PE, Mach-O, XCOFF, and Plan 9 a.out) and uses the new \internal/saferio\ package to prevent out-of-memory crashes when parsing potentially malicious or corrupted files. This change also includes comprehensive tests for various build modes and platforms, as well as fuzzing coverage for the reader.

src/debug · high confidence

New directive analyzer for Go toolchain comments

The vendored x/tools package now includes a new 'directive' analyzer that validates Go toolchain directives like //go:debug. This analyzer checks that directives are placed correctly (e.g., //go:debug must be in package main or test files, above the package declaration) and reports errors for invalid usage, enhancing static analysis capabilities for Go source files.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/directive · high confidence

New directory and file-system utilities: ReadDir, CopyFS, and large-copy tests

The os package now provides a more efficient ReadDir method on File and a standalone ReadDir function that returns fs.DirEntry slices, offering a modern alternative to the legacy Readdir and Readdirnames methods. Additionally, a new CopyFS function is introduced to recursively copy an fs.FS into a local directory, handling files, directories, and symbolic links while preventing overwrites of existing files. These changes are accompanied by new tests in copy\_test.go that validate large file copying via network sockets and various file-to-file copy scenarios with different offsets and limits.

src/os · high confidence

New distpack tool for building Go distribution archives

The new cmd/distpack tool creates the binary, source, and module-form distribution archives (tgz/zip) used for Go releases. It filters out build artifacts, VCS directories, and platform-specific binaries, renames go.mod files to \_go.mod for the module distribution, and ensures the resulting archives are sorted and validated against strict inclusion/exclusion rules.

src/cmd/distpack · high confidence

New encoding packages: ascii85 and asn1

The encoding package now includes two new sub-packages: ascii85, which implements the ascii85 data encoding used in btoa, PostScript, and PDF formats, and asn1, which implements parsing of DER-encoded ASN.1 data structures as defined in ITU-T Rec X.690. The ascii85 package provides functions for encoding and decoding data streams, while the asn1 package offers utilities for working with ASN.1 types such as integers, bit strings, and OID.

src/encoding · high confidence

New experimental export tool for writing Go type information

A new \cmd/export\ tool has been added to write type information for Go programs, primarily intended for use by \go list -export\. It reads a JSON configuration file specifying source files, compiler details, and import mappings, then parses and type-checks the code to produce export data via \gcexportdata\. The tool includes a custom importer that resolves imports using the provided map and package files, with special handling for the \unsafe\ package.

src/cmd/export · high confidence

New fast Go syntax parser and compiler diagnostics

The Go compiler now uses a new, faster syntax parser in \cmd/compile/internal/syntax\ to parse Go source code. This parser provides improved error reporting, including better recovery after syntax errors and more precise column information for diagnostics. It also supports new language features such as type parameters (generics), type aliases, and the \\~\ operator for interface constraints. The parser handles \//line\ directives and \//go:build\ constraints, and includes a regression test harness for syntax errors.

src/cmd/compile/internal/syntax · high confidence

New flag registration functions and usage examples

The flag package introduces Func and BoolFunc methods, allowing users to register custom flags with arbitrary parsing logic via callback functions, and TextVar, which provides a convenient way to bind flags to types implementing the encoding.TextUnmarshaler interface. To help users adopt these new capabilities, the package now includes example code demonstrating how to use FlagSet for subcommands, how to implement custom flag types, and how to utilize the new Func, BoolFunc, and TextVar registration methods.

src/flag · high confidence

New framepointer vet check for assembly code

The Go toolchain now includes a new vet check that analyzes assembly files to detect cases where the frame pointer is modified before being saved. This analyzer, sourced from golang.org/x/tools, specifically targets frameless functions on Linux and Darwin for amd64 and arm64 architectures, helping developers identify potential bugs in low-level code that could corrupt the stack frame.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/framepointer · high confidence

New go\_android\_exec wrapper for running Go binaries on Android devices

A new tool located in misc/go\_android\_exec has been added to facilitate running Go binaries on Android devices via ADB. This wrapper handles uploading the binary and necessary source files (including entire modules in module mode) to the device, executes the binary, and correctly captures the exit code by parsing it from the command output to work around known ADB issues. It also implements file locking to serialize ADB commands and waits for the device to fully boot before proceeding.

_misc/go\_android\exec · high confidence

New gover package for Go toolchain version management

The \cmd/go/internal/gover\ package has been introduced to centralize the handling of Go toolchain versions (e.g., 1.21, go1.21rc1) and their associated logic. This new package provides utilities for comparing, validating, and sorting toolchain versions, distinguishing between language versions and specific releases (including pre-releases). It includes functions to parse version strings from \go.mod\ and \go.work\ files, determine the local Go version, and manage toolchain switching semantics. The package also defines constants for version-specific behaviors in the Go toolchain, such as graph pruning and indirect dependency handling, and introduces error types for modules that are too new for the current Go version.

src/cmd/go/internal/gover · high confidence

New hostport analyzer detects IPv6-incompatible address formatting

The \hostport\ static analysis tool has been added to the Go vet suite. It detects calls to \net.Dial\ (and related functions) where the address is constructed using \fmt.Sprintf\ with formats like "%s:%d" or "%s:%s", which are incompatible with IPv6. The analyzer reports a diagnostic and provides an automatic fix to replace the \fmt.Sprintf\ call with \net.JoinHostPort\, ensuring the code works correctly with both IPv4 and IPv6 addresses.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/hostport · high confidence

New internal analysis helper packages for documentation, fixes, and type indexing

The vendored golang.org/x/tools library adds several new internal packages to the analysis infrastructure. The analyzerutil package introduces helpers for extracting analyzer documentation from package comments and reading files into the analysis FileSet, along with a utility to check if a file uses a specific Go version. The driverutil package provides implementation helpers for analysis drivers, including logic to apply and merge suggested fixes, validate fix edits, print diagnostics in plain text or JSON, resolve diagnostic URLs, and enforce file-read access policies. Additionally, a new typeindex analyzer is added to provide type information indexes for use by other analyzers.

src/cmd/vendor/golang.org/x/tools/internal/analysis · high confidence

New internal archive package for reading Go toolchain archives

The Go toolchain now includes a new internal package (src/cmd/internal/archive) that implements reading of archive files (.a) generated by the Go toolchain. This package provides structured parsing of archive entries, including Go object files, native object files, and package definitions, with improved error handling for corrupt or truncated archives. The implementation replaces direct file parsing logic previously scattered across cmd/pack and cmd/compile, centralizing archive reading functionality for reuse by other toolchain components.

src/cmd/internal/archive · high confidence

New internal browser package for opening URLs

The new internal/browser package provides utilities to open URLs in the user's default browser. It supports environment variables (BROWSER), platform-specific commands (open on macOS, start on Windows, xdg-open on Linux desktops), and fallbacks to common browser executables (Chrome, Chromium, Firefox). The Open function attempts each command with a 3-second timeout to determine success.

src/cmd/internal/browser · high confidence

New internal codesign package for Mach-O ad-hoc signing

The Go toolchain now includes a new internal package, cmd/internal/codesign, which provides the logic for performing ad-hoc code signing of Mach-O binaries on Darwin. This package implements the necessary structures and algorithms to generate code signatures compatible with the Darwin linker, ensuring that Go-built executables are properly signed for execution on macOS.

src/cmd/internal/codesign · high confidence

New internal coverage data reader with optimized file access

The \src/cmd/internal/cov\ package now includes a new \CovDataReader\ and \MReader\ implementation for reading and manipulating coverage data files. \CovDataReader\ provides a structured visitor interface to process coverage meta-data and counter data files, facilitating operations like merging or analyzing coverage data. \MReader\ optimizes file reading by using memory-mapped views (\bio.SliceRO\) when possible, falling back to explicit reads and seeks, which improves performance for large coverage files. A test case (\TestIssue58411\) verifies correct handling of small coverage files with large arguments, ensuring no short-read errors occur.

src/cmd/internal/cov · high confidence

New internal package for Mach-O file handling

The Go toolchain now includes a new internal package, \src/cmd/internal/macho\, to handle Mach-O binary formats beyond the capabilities of the standard \debug/macho\ package. This addition provides utilities for reading and updating load commands, which are essential for the toolchain's interaction with macOS and iOS binaries.

src/cmd/internal/macho · high confidence

New internal package for parsing and joining quoted command-line arguments

The new \src/cmd/internal/quoted\ package provides utilities to split strings into fields respecting single and double quotes and to join argument lists back into a parseable string. It includes a \Flag\ type that implements \flag.Value\, allowing command-line flags (such as linker external linker flags) to accept space-separated, quoted arguments that are correctly parsed and re-serialized.

src/cmd/internal/quoted · high confidence

New internal refactor package for computing code edits

The vendored golang.org/x/tools now includes a new internal refactor package that provides operators for computing common textual edits for refactoring tools. This package introduces capabilities to delete variables and constants (handling value specs and assignment statements), manage import declarations (adding imports with fresh names and proper grouping), and generate fresh identifier names. It also includes a new packagepath helper for checking import accessibility and identifying standard library packages.

src/cmd/vendor/golang.org/x/tools/internal/refactor · high confidence

New internal type-analysis helpers added to vendored x/tools

The vendored golang.org/x/tools package now includes a new typesinternal package providing utilities for Go static analysis tools. This adds functions to classify call expressions (distinguishing static, interface, dynamic, builtin, and conversion calls), detect whether variables are assigned or have their addresses taken, determine if expressions have side effects, and generate zero-value expressions or strings for any type. It also introduces helpers to identify named types, functions, and methods by package and name, along with improved error code extraction and type qualifier generation.

src/cmd/vendor/golang.org/x/tools/internal/typesinternal · high confidence

New io/fs package with filesystem abstraction and utilities

The \io/fs\ package introduces a new filesystem abstraction layer, providing interfaces like \FS\, \File\, \DirEntry\, and \FileInfo\ that allow code to operate on file systems without depending on the host OS. This includes new top-level functions such as \Glob\, \ReadDir\, \ReadFile\, \WalkDir\, \Stat\, \Sub\, \ReadLink\, and \Lstat\ which work with any \FS\ implementation. The package also provides \FormatFileInfo\ and \FormatDirEntry\ for human-readable formatting of file metadata, and \FileInfoToDirEntry\ for converting between metadata types. These utilities enable writing portable code that can interact with various file system backends, including in-memory file systems for testing.

src/io · high confidence

New iterator-based splitting functions and page-boundary safety tests

The bytes package introduces iterator-based splitting functions (Lines, SplitSeq, SplitAfterSeq, FieldsSeq, FieldsFuncSeq) that yield subslices without constructing a new slice containing the results, reducing allocations. Additionally, new tests in boundary\_test.go verify that byte operations like Equal, IndexByte, Index, and Count do not read across page boundaries and cause spurious page faults.

src/bytes · high confidence

New lexer package for the Go assembler

The assembler now uses a new internal \lex\ package to handle lexical analysis. This package introduces a \TokenReader\ interface and a stack-based input system that supports \\#include\ processing, macro expansion (including nested and multiline macros), and preprocessor directives like \\#ifdef\/\\#ifndef\. It also correctly handles \//go:build\ comments and provides specific token types for ARM shift operators (e.g., \\<\<\, \\>\>\, \-\>\, \@\>\).

src/cmd/asm/internal/lex · high confidence

New local version-control test server for Go module operations

The Go command now includes a local test server (vcweb) that serves version-control repositories for testing module operations. This server supports Git, Mercurial, Subversion, and Fossil repositories, allowing the go command to test VCS interactions locally without relying on external services. The server uses script-based configuration to define repository contents and serves them via HTTP, with specific handlers for each VCS type. This enables more reliable and faster testing of Go module operations that involve version control systems.

src/cmd/go/internal/vcweb · high confidence

New maps package with generic map utilities

The new \src/maps\ package provides a set of generic functions for working with maps, including \Clone\ for shallow copying, \Copy\ for merging maps, \Equal\ and \EqualFunc\ for comparing map contents, and \DeleteFunc\ for conditional removal. It also introduces iterator-based functions \All\, \Keys\, and \Values\ to traverse map data, along with \Insert\ to add key-value pairs from an iterator and \Collect\ to build a map from an iterator.

src/maps · high confidence

New module package index for faster go list and dependency resolution

The go command now uses a new module index (in cmd/go/internal/modindex) to speed up package lookups. This index is generated for modules in the module cache and GOROOT, stored in the build cache, and used by go list and dependency resolution to avoid re-parsing source files. The index format is documented in index\_format.txt, and the implementation includes scanning, encoding, and decoding logic with tests.

src/cmd/go/internal/modindex · high confidence

New path and string utility functions in cmd/go

The cmd/go tool now includes a new internal str package providing utilities for path and string manipulation. This adds HasPathPrefix and HasFilePathPrefix for checking path prefixes (with HasFilePathPrefix handling case-insensitive volume names on Windows), TrimFilePathPrefix for stripping leading path elements while preserving absolute/relative semantics, QuoteGlob for escaping glob metacharacters, and ToFold/FoldDup for detecting case-insensitive string duplicates. These functions support the go command's internal path handling and import collision detection.

src/cmd/go/internal/str · high confidence

New release note validation and merging tooling

The vendored golang.org/x/build package now includes a new relnote subpackage that provides tools for managing Go release notes. This adds a CheckFragment function to validate that release note files contain complete sentences or TODOs, and a Merge function to combine multiple Markdown fragments into a single document. The merging process automatically handles standard library minor changes by inserting package headings and expanding symbol links (e.g., \[Buffer\] to a full link) based on the file's location.

src/cmd/vendor/golang.org/x/build · high confidence

New release note workflow and documentation structure

The documentation directory now includes a README detailing the new release note workflow, which requires adding markdown files to the \doc/next\ directory instead of using RELNOTE comments, and introduces the \relnote\ tool for generating final release notes. Additionally, new documentation pages have been added, including a guide to the Go assembler (\doc/asm.html\) and an updated Go memory model (\doc/go\_mem.html\).

doc · high confidence

New scripttest package for tool-specific script testing

The new \cmd/internal/script/scripttest\ package provides a testing harness that adapts the internal script engine for use by other Go tools (such as the compiler and linker). It introduces \RunToolScriptTest\ to execute text-based script tests, allowing tools to replace their installed binaries with test versions via \ToolReplacement\. The package also adds a suite of script conditions in \conditions.go\ to detect platform capabilities (e.g., cgo, race detector, fuzzing) and environment settings (e.g., \GOEXPERIMENT\, \GODEBUG\), and includes a \readme.go\ component to automatically generate and validate the \README\ documentation for script commands and conditions.

src/cmd/internal/script/scripttest · high confidence

New slices package with generic slice utilities and iterators

The Go standard library now includes the new \slices\ package, providing a comprehensive set of generic functions for working with slices. This includes operations for searching and comparison (BinarySearch, Compare, Equal, Index, Contains), modification (Insert, Delete, DeleteFunc, Replace, Compact, Clone, Reverse, Grow, Repeat, Concat, Chunk), and sorting (Sort, SortFunc, SortStableFunc, Min, Max, IsSorted). Additionally, it introduces iterator support via \All\, \Backward\, and \Values\, along with helper functions like \Collect\ and \Sorted\ to bridge between iterators and slices.

src/slices · high confidence

New ssacompile package for SSA-to-assembly compilation

The Go compiler now includes a new \cmd/compile/internal/ssacompile\ package that handles the final stage of converting SSA (Static Single Assignment) form into target-specific assembly instructions. This package introduces several key optimization passes: \addressingModes\ combines address calculations into memory operations for architectures like AMD64 and 386; \branchelim\ eliminates trivial branches by generating conditional select (CMOV) instructions; \copyelim\ and \phielim\ remove redundant copy and phi operations; \cpufeatures\ tracks CPU feature availability (like AVX, AVX2, AVX-512) to enable feature-gated code generation; and \critical\ splits critical edges in the control flow graph to prepare for register allocation. The package also includes configuration support for various architectures (amd64, 386, arm, arm64, ppc64, mips64, loong64, s390x, riscv64, wasm) and debugging tools like \checkbce\ for bounds check analysis.

src/cmd/compile/internal/ssacompile · high confidence

New static analysis checks for append misuse and WaitGroup race conditions

The Go toolchain now includes two new static analysis passes in the vendored x/tools package. The 'appends' analyzer detects calls to the built-in append function that pass only a single argument (the slice itself), which are no-ops and often indicate a missing value. The 'waitgroup' analyzer detects misuses of sync.WaitGroup, specifically flagging calls to Add made from inside a new goroutine, which can cause a race condition with Wait.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/appends · high confidence

New static analysis checks for unchecked Scanner and SQL Rows errors

The Go toolchain now includes two new static analysis passes, scannererr and sqlrowserr, which detect common mistakes where developers iterate over bufio.Scanner or sql.Rows without checking the final error state. The scannererr analyzer flags loops using Scanner.Scan() that do not subsequently call Scanner.Err(), while sqlrowserr flags loops using sql.Rows.Next() that do not call Rows.Err(). These checks help prevent silent data loss or incorrect program behavior caused by ignoring I/O and database iteration errors.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/scannererr, src/cmd/vendor/golang.org/x/tools/go/analysis/passes/sqlrowserr · high confidence

New stringintconv check flags integer-to-string conversions

The Go vet tool now includes the stringintconv analyzer, which detects conversions like string(x) where x is an integer type (excluding byte and rune). This pattern is flagged because it produces a string containing the UTF-8 representation of the Unicode code point x, rather than the decimal string representation of the number. The analyzer provides suggested fixes to replace such conversions with safer alternatives like strconv.Itoa or fmt.Sprint.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stringintconv · high confidence

New strings package capabilities: Builder, Compare, Clone, Cut, and Sequence Iterators

The strings package introduces several new capabilities to improve performance and usability. A new strings.Builder type allows for efficient string construction with minimal memory copying, supporting Write, WriteByte, WriteRune, and WriteString methods. A new strings.Compare function provides lexicographic three-way comparison for use with sorting functions. The strings.Clone function creates a fresh copy of a string, useful for releasing memory when retaining only a small substring of a larger string. New Cut, CutPrefix, and CutSuffix functions offer efficient ways to split strings around a separator. Additionally, new iterator functions (Lines, SplitSeq, SplitAfterSeq, FieldsSeq, FieldsFuncSeq) allow processing string segments without allocating intermediate slices, reducing memory overhead for large strings.

src/strings · high confidence

New testing packages: cryptotest, fstest, and iotest

The testing package now includes three new sub-packages to support specific testing scenarios. The testing/cryptotest package provides SetGlobalRandom, allowing tests to use a deterministic cryptographic randomness source for reproducible crypto tests. The testing/fstest package introduces MapFS, an in-memory file system implementation, and TestFS, a utility to validate any fs.FS implementation against standard file system behaviors. The testing/iotest package adds utilities for testing io.Reader implementations, including ErrReader and NewReadLogger.

src/testing · high confidence

New testing utilities for telemetry counters

A new \countertest\ package has been added to the vendored \golang.org/x/telemetry\ module, providing testing utilities for telemetry counters. This package allows tests to enable telemetry data writing to disk via the \Open\ function and read counter values using \ReadCounter\, \ReadStackCounter\, and \ReadFile\. It includes safety checks to ensure it is only used within test code, preventing accidental usage in production.

src/cmd/vendor/golang.org/x/telemetry/counter/countertest · high confidence

New typeindex package for efficient symbol lookup in Go analysis

The vendored x/tools dependency now includes a new \typeindex\ package that provides an efficient index of type information for a Go package. This allows analyzers to quickly look up whether a symbol is referenced and where, or find the AST cursor for a specific \types.Object\ declaration. The implementation uses compressed varint-encoded deltas to store usage cursors, optimizing for space and CPU performance compared to the standard \types.Info\ map. This change supports the new \hostport\ analyzer added to \cmd/vet\ by providing the underlying infrastructure for efficient symbol usage tracking.

src/cmd/vendor/golang.org/x/tools/internal/typesinternal/typeindex · high confidence

New unmarshal analysis detects non-pointer arguments in encoding functions

The Go vet tool now includes a new 'unmarshal' analyzer that checks calls to functions in the encoding/json, encoding/xml, encoding/gob, and encoding/asn1 packages. It specifically flags instances where a non-pointer, non-interface value is passed as the argument intended to receive the decoded data, helping users catch common mistakes that would otherwise result in runtime errors or silent failures.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal · high confidence

New vet pass detects invalid testing.T calls in goroutines

The Go vet tool now includes the \testinggoroutine\ analyzer, which flags calls to \\*testing.T\ termination methods (such as \Fatal\, \Fatalf\, \FailNow\, and \Skip\) when they occur inside goroutines spawned by a test. This prevents tests from hanging or failing silently due to incorrect goroutine usage. An experimental \subtest\ flag is also available to check for similar issues in \t.Run\ subtests.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine · high confidence

Port cmd/cover from golang.org/x/tools to the standard library

The \cmd/cover\ tool has been moved from the external \golang.org/x/tools\ repository into the Go standard library (\src/cmd/cover\). This change introduces a new package-scope instrumentation mode (enabled via the \-pkgcfg\ flag) that allows the tool to process all source files in a package at once, including a new 'emit meta file' mode for packages without test files. The tool now uses \golang.org/x/tools/cover\ for profile parsing, supports hybrid instrumentation modes (\set\, \count\, \atomic\, \regonly\, \testmain\), and includes updated HTML output with package names in titles and preserved compiler directives.

src/cmd/cover · high confidence

Profile-guided devirtualization optimization enabled

The Go compiler now includes a new devirtualization package that performs profile-guided devirtualization. This optimization replaces indirect interface and function value calls with conditional direct calls to the hottest concrete callee identified from execution profiles, falling back to the original indirect call. This transformation enables further inlining of the direct call path, improving runtime performance for code patterns involving interface dispatch or function pointers.

src/cmd/compile/internal/devirtualize · high confidence

Reflect now supports the register-based calling convention (regabi)

The reflect package now implements the register-based calling convention (regabi) for reflect.Call and reflect.MakeFunc across all supported architectures (amd64, arm64, s390x, ppc64, riscv64, loong64, mips64, mips, arm, 386). This change introduces new assembly stubs (e.g., makeFuncStub, methodValueCall) and Go-level ABI translation logic (abi.go) to correctly pass arguments and return values via CPU registers instead of the stack where possible, improving performance and aligning with the Go 1.21+ ABI. The implementation includes support for spilling arguments to the stack when registers are exhausted, handling method receivers, and ensuring correct garbage collection scanning of register-backed arguments.

src/reflect · high confidence

Support for running packages by version suffix in 'go run'

The 'go run' command now accepts a version suffix (such as @latest or @v1.0.0) on the package argument. When this suffix is present, the command builds the program in module-aware mode, explicitly ignoring the go.mod file in the current directory or any parent directory. This allows users to run programs without affecting the dependencies of the main module.

src/cmd/go/internal/run · high confidence

Time formatting and parsing now support DateOnly, TimeOnly, and DateTime layouts

The \time\ package adds three new predefined layout constants—\DateOnly\ ("2006-01-02"), \TimeOnly\ ("15:04:05"), and \DateTime\ ("2006-01-02 15:04:05")—to \src/time/format.go\, enabling users to format and parse dates and times without including extraneous components like time zones or fractional seconds. This change is supported by updated documentation, new example code in \src/time/example\_test.go\, and comprehensive formatting tests in \src/time/format\_test.go\.

src/time · high confidence

Updated vendored golang.org/x/sys/windows for Windows/ARM support

The vendored copy of golang.org/x/sys/windows has been updated to include support for the Windows/ARM architecture. This change adds new source files (such as aliases.go, dll\_windows.go, and syscall\_windows.go) and regenerates Windows syscalls to ensure the Go toolchain can correctly build and run on Windows ARM64 systems.

src/cmd/vendor/golang.org/x/sys/windows · high confidence

Updated vendored golang.org/x/tools with new AST utility functions

The vendored copy of golang.org/x/tools has been updated, introducing new capabilities in the go/ast/astutil package. Users can now use PathEnclosingInterval to find the AST node enclosing a specific source code interval, and AddImport or AddNamedImport to programmatically add import statements to Go files. The update also includes a new Apply function for traversing and modifying syntax trees, along with a deprecated Unparen wrapper that now delegates to the standard library's ast.Unparen.

src/cmd/vendor/golang.org/x/tools/go/ast/astutil · high confidence

Vet adds sigchanyzer to detect unbuffered signal channels

The Go vet tool now includes the sigchanyzer analyzer, which detects when an unbuffered channel is passed to signal.Notify. This pattern risks missing signals, and the analyzer suggests adding a buffer size of 1 to the channel creation to ensure reliable signal handling.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer · high confidence

Vet now checks standard library interface method signatures

The Go vet tool now includes the stdmethods analyzer, which detects misspellings or incorrect signatures in methods intended to satisfy well-known standard library interfaces (such as io.WriterTo, json.Marshaler, and errors.Is/As/Unwrap). This prevents subtle runtime failures where a type appears to implement an interface but has a mismatched method signature, ensuring that methods like WriteTo return (int64, error) instead of just error when required.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stdmethods · high confidence

Vet now includes the errorsas static analysis check

The Go vet tool now incorporates the \errorsas\ analyzer from \golang.org/x/tools\. This new check detects calls to \errors.As\ where the second argument is not a pointer to a type implementing the \error\ interface (or \any\), helping users catch incorrect usage patterns early in the development process.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/errorsas · high confidence

bufio: introduce Reader.Discard, Writer.AvailableBuffer, and Reader/Writer.Size accessors

The bufio package adds new capabilities to its buffered I/O types. Reader now includes a Discard method to skip bytes, Writer exposes an AvailableBuffer method to allow users to fill a buffer before writing, and both Reader and Writer provide Size accessors to query the underlying buffer size. These additions enhance control and efficiency for buffered I/O operations.

src/bufio · high confidence

fmt.Errorf supports error wrapping with %w verb

The fmt.Errorf function now supports the %w verb to wrap errors, allowing callers to attach context to an error while preserving its original value for errors.Is and errors.As checks. When a single %w is used, the returned error implements Unwrap() returning the wrapped operand; when multiple %w verbs are present, the returned error implements Unwrap() \[\]error, returning all wrapped errors in the order they appeared in the format string. Non-error operands passed to %w are treated as invalid and produce a %!w(...) error message in the output. This change also updates the type of fmt.Errorf to match errors.New when no formatting is needed, reducing allocations.

src/fmt · high confidence

go tool trace now supports viewing Go 1.22+ (v2) trace files

The trace viewer has been rewritten to support the new v2 trace format, allowing users to open and inspect traces generated by Go 1.22 and later versions. This update introduces a goroutine-oriented view that provides a clearer timeline of goroutine states, including execution, blocking, and syscall transitions. The tool also adds a thread-oriented mode for v2 traces, displays end stack traces for better context, and introduces a minimum mutator utilization (MMU) plot to help identify performance bottlenecks. Additionally, the viewer now supports user-defined tasks and regions, enabling more granular analysis of application behavior.

src/cmd/trace · high confidence

go version command gains -m, -v, and -json flags

The 'go version' command now supports inspecting Go binary files. The new -m flag prints embedded module version information for specified files or directories, while -json outputs the runtime/debug.BuildInfo in JSON format (requiring -m). The -v flag reports unrecognized files during directory scans. If no files are provided, the command prints its own version information as before.

src/cmd/go/internal/version · high confidence

gofmt now supports code simplification and AST rewriting

The gofmt command now includes the -s flag to automatically simplify Go source code, such as removing redundant types in composite literals, shortening slice expressions like s\[a:len(s)\] to s\[a:\], and cleaning up range loops. It also introduces the -r flag, allowing users to apply custom rewrite rules (e.g., 'a\[b:len(a)\] -\> a\[b:\]') to transform the AST before formatting. These features enable automated code modernization and style enforcement beyond basic indentation and alignment.

src/cmd/gofmt · high confidence

net/http: add Server.DisableOptionsHandler for custom OPTIONS handling

The HTTP server now provides a new DisableOptionsHandler field that allows users to disable the default OPTIONS \* handler. This enables custom handling of OPTIONS requests, which is useful for implementing custom CORS or other protocol-specific behaviors.

src/net · high confidence

sync/atomic introduces typed atomic types and new bitwise operations

The sync/atomic package now provides typed atomic types (Bool, Pointer\[T\], Int32, Int64, Uint32, Uint64) with methods like Load, Store, Swap, CompareAndSwap, Add, And, and Or, replacing the older pointer-based functions for safer, more ergonomic usage. Additionally, the package adds atomic bitwise And and Or operations for integer types, and introduces a Value type for atomically loading and storing consistently typed interface{} values, supporting copy-on-write patterns.

src/sync · high confidence

Removals

Removed Mach-O test data file

The test data file \src/pkg/debug/macho/testdata/hello.b\ has been removed from the repository. This file previously contained assembly source code for a simple 'hello, world' program used in testing the Mach-O debug package.

src/pkg · high confidence

Architecture

Compiler IR refactored into a new internal package

The internal compiler IR (Intermediate Representation) has been reorganized into a new dedicated package at \src/cmd/compile/internal/ir\. This change consolidates the core IR definitions, node types, and formatting logic into a single location, replacing the previous scattered structure. For users, this is an internal compiler restructuring that does not change language semantics or generated code, but it improves the maintainability and clarity of the compiler's internal representation.

src/cmd/compile/internal/ir · high confidence

Compiler backend refactored into the ssagen package

The Go compiler's SSA code generation logic has been reorganized into a new internal package named cmd/compile/internal/ssagen. This change introduces a modular structure for the backend, separating architecture-specific details (arch.go), ABI wrapper generation and symbol ABI handling (abi.go), intrinsic implementation and registration (intrinsics.go), and write-barrier analysis (nowb.go). It also adds initial test coverage for the intrinsic system (intrinsics\_test.go) and refactors local variable sorting in the stack frame generator (pgen.go) to optimize packing by alignment rather than size.

src/cmd/compile/internal/ssagen · high confidence

Compiler builtin runtime declarations refactored into separate files

The internal compiler files defining runtime builtin signatures have been split into dedicated \coverage.go\ and \runtime.go\ modules within the \typecheck/\_builtin\ package. This restructuring separates coverage hook definitions from the extensive list of runtime function stubs (such as panic handlers, map operations, and string concatenations) that the compiler emits, improving maintainability of the compiler's internal type-checking infrastructure.

_src/cmd/compile/internal/typecheck/\builtin · high confidence

Disassembly logic moved to a new internal package

The disassembly routines have been extracted from the \cmd/internal/objfile\ package into a new standalone package at \src/cmd/internal/disasm\. This change allows tools that do not require disassembly capabilities to avoid depending on the heavy \x/arch\ disassembler libraries, reducing their dependency footprint. The new package provides the \Disasm\ type and \DisasmForFile\ function to handle architecture-specific disassembly for ARM, ARM64, Loong64, PPC64, RISC-V, S390X, and x86.

src/cmd/internal/disasm · high confidence

Extract DWARF generation logic into a dedicated dwarfgen package

The internal DWARF debug information generation logic has been moved from the main compiler package into a new \cmd/compile/internal/dwarfgen\ package. This refactoring consolidates the handling of DWARF scopes, inlined subroutine calls, and variable tracking into dedicated files (\dwarf.go\, \dwinl.go\, \scope.go\, \marker.go\), while adding comprehensive tests (\scope\_test.go\, \linenum\_test.go\) to verify the correctness of the generated debug information.

src/cmd/compile/internal/dwarfgen · high confidence

Extract go command configuration into a dedicated cfg package

The configuration logic previously embedded in the cmd/go package has been extracted into a new, dedicated internal package (cmd/go/internal/cfg). This change centralizes shared build parameters, flags, and environment handling (such as CGO\_ENABLED defaults and tool tags) into a single location, improving code organization and reducing dependency cycles within the go command implementation.

src/cmd/go/internal/cfg · high confidence

Extracted SSA debug information handling into a dedicated package

The debug information generation logic for the SSA compiler has been moved from the main ssa package into a new, separate ssadebug package. This refactoring isolates the code responsible for tracking variable slots, managing location lists, and synthesizing debug values for function arguments, making the core SSA package cleaner and the debug-specific logic easier to maintain.

src/cmd/compile/internal/ssa/ssadebug · high confidence

Go command rewritten in Go with modularized internal packages

The \go\ command implementation has been ported from C to Go, resulting in a significant architectural shift where internal logic is split into dedicated sub-packages (such as \cmd/go/internal/{build,modcmd,test,work}\). This change introduces a new script-based test framework to replace the previous bash-based test suite, improves cross-platform consistency, and enables new capabilities like workspace mode and toolchain management.

src/cmd/go · high confidence

Introduce dedicated ELF loader package

The ELF file reading logic has been moved from the general linker package into a new, dedicated \cmd/link/internal/loadelf\ package. This refactoring isolates the ELF parsing implementation (including structures for sections, symbols, and attributes) from the broader linker code, improving modularity and maintainability of how external ELF objects are loaded.

src/cmd/link/internal/loadelf · high confidence

Introduce new linker symbol loader and SymbolBuilder API

The linker now uses a new internal loader package to manage symbol tables, relocations, and auxiliary data, replacing the previous sym.Symbol-based approach. This change introduces a SymbolBuilder helper for constructing and updating symbol contents, along with new methods for accessing and modifying symbol attributes, relocations, and data. The new loader provides a more structured and efficient way to handle symbol resolution and object file loading, improving the overall reliability and performance of the linking process.

src/cmd/link/internal/loader · high confidence

Linker refactoring and new object file format adoption

The linker in src/cmd/link/internal/ld has undergone a massive architectural overhaul, migrating from the legacy LSym-based symbol representation to a new loader-based system and adopting the new object file format (goobj2) as the default. This change introduces a new symbol type (Symbol), replaces linked-list data structures with slices, and refactors core passes such as dodata, reloc, and DWARF generation to use the new loader APIs. The update also includes significant improvements to platform support, including enabling PIE build mode on more platforms (Windows, macOS ARM64, FreeBSD), adding support for AIX, MIPS, and RISC-V, and enhancing DWARF debug information generation (DWARF5 support, compression). These changes improve linker performance, reduce memory usage, and provide a more robust foundation for future linker features.

src/cmd/link/internal/ld · high confidence

New arch package consolidates assembler architecture support

The assembler now uses a new \cmd/asm/internal/arch\ package to centralize architecture-specific configuration. This change introduces a unified \Arch\ struct that maps instruction names, register names, and jump instructions for all supported targets (x86, ARM, ARM64, MIPS, PPC64, RISCV64, s390x, Loong64, and wasm). By moving these mappings and special instruction handling logic out of the core assembler and into this dedicated package, the codebase achieves a cleaner separation of concerns, making it easier to maintain and extend support for new architectures or instruction sets.

src/cmd/asm/internal/arch · high confidence

New internal Mach-O loader package

The linker now includes a dedicated internal package (loadmacho) for reading Mach-O object files, introducing specific data structures for Mach-O commands, segments, sections, relocations, and symbols to support the new-style loader architecture.

src/cmd/link/internal/loadmacho · high confidence

New objw package for object file writing and program generation

The Go compiler now includes a new internal package, objw, which consolidates the logic for writing object file data and generating machine code instructions. This package provides utilities for encoding integers, varints, and symbols into symbol tables, and introduces a Progs structure to manage the accumulation and flushing of program instructions (Progs) into the final output. This change refactors the backend to separate object-writing concerns from the main compiler logic, supporting the new ABI and register-based calling conventions.

src/cmd/compile/internal/objw · high confidence

Refactor 'go clean' into a dedicated internal package

The implementation of the 'go clean' command has been moved from the main cmd/go package into a new, dedicated internal package (src/cmd/go/internal/clean). This structural change isolates the command's logic, including its flag handling (-i, -r, -cache, -testcache, -modcache, -fuzzcache) and execution flow, improving code organization and maintainability without altering the user-facing behavior of the command.

src/cmd/go/internal/clean, src/cmd/go/internal/help · high confidence

Refactor 'go get' into the modget package

The module-aware implementation of the 'go get' command has been reorganized into the new internal package src/cmd/go/internal/modget. This change consolidates the command's logic, including argument parsing, version resolution, and dependency updates, into dedicated files (get.go, query.go) to improve code structure and maintainability without altering the user-facing behavior of the command.

src/cmd/go/internal/modget · high confidence

Refactor compiler walk package into walkState receiver methods

The \cmd/compile/internal/walk\ package has been refactored to use a \walkState\ struct as the receiver for all walking functions (e.g., \walkAssign\, \walkExpr\, \walkCompare\). This change replaces the previous global or function-pointer-based state management with an explicit struct, improving code organization and preparing the compiler for further changes in how state is passed during the IR lowering phase.

src/cmd/compile/internal/walk · high confidence

Refactor go command build system into internal/work package

The monolithic build logic in the go command has been split into the new internal/work package, separating the action graph planning (action.go), build execution (build.go), and build ID management (buildid.go). This refactoring introduces a Builder struct to manage global build state and an Action graph to represent build dependencies, enabling more modular and testable build operations while preserving the existing command-line interface and build behavior.

src/cmd/go/internal/work · high confidence

Refactor go list into a modular internal package

The internal implementation of the 'go list' command has been restructured from a monolithic file into a dedicated package (src/cmd/go/internal/list). This change introduces a new context.go file to manage build environment details (such as GOOS, GOARCH, and cgo settings) and separates the core listing logic into list.go, improving code organization and maintainability without altering the user-facing command behavior.

src/cmd/go/internal/list · high confidence

Refactor network I/O polling into internal/poll package

The network I/O polling logic has been extracted from the net package into a new internal/poll package. This change centralizes the handling of file descriptors, socket operations, and platform-specific I/O mechanisms (such as Windows overlapped I/O and Linux epoll), providing a cleaner separation of concerns for the net package while maintaining the same external behavior for users.

src/internal · high confidence

Refactored 'go mod' into dedicated subcommands

The 'go mod' command has been split into distinct subcommands (download, edit, graph, init, tidy, vendor, verify, why), each with its own implementation file in the modcmd package. This structural change improves command organization and allows for more specific help text and flag handling for each operation.

src/cmd/go/internal/modcmd · high confidence

Refactored compiler type system into a dedicated internal package

The compiler's type-handling logic has been reorganized into the new \cmd/compile/internal/types\ package. This change introduces a unified \Type\ representation and centralizes core functionality—including type identity checks (\identity.go\), size and alignment calculations (\size.go\), algorithm selection for comparison and hashing (\alg.go\), and symbol management (\sym.go\, \pkg.go\). It also adds support for the \-lang\ flag to specify Go language versions (\goversion.go\) and provides a cleaner API for constructing and formatting types (\fmt.go\, \universe.go\).

src/cmd/compile/internal/types · high confidence

Refactored go command into modular internal packages

The internal implementation of the go command has been reorganized into distinct packages (base, env, error, flag, goflags, limit, path, signal, tool) to improve code structure and maintainability. This refactoring introduces shared utilities for command-line flag handling (including $GOFLAGS support), environment variable management, and signal processing, while removing legacy functions and consolidating common logic. Users benefit from a more robust and modular command-line interface, though the external behavior of the go command remains unchanged.

src/cmd/go/internal/base · high confidence

Restructured and regenerated SSA rewrite rules for AMD64, ARM, and ARM64

The SSA rewrite packages have been moved into a new \ssa/rewrite\ directory structure, organizing architecture-specific logic into dedicated subdirectories (e.g., \amd64\, \arm\, \arm64\). This change includes regenerated rewrite rules for AMD64, ARM, and ARM64, as well as new helper functions for handling flags, bit tests, and constant encoding on these architectures. For users, this represents an internal compiler refactoring that improves code organization and maintainability without altering the generated machine code or public APIs.

src/cmd/compile/internal/ssa/rewrite · high confidence

Telemetry counter logic separated into its own package

The telemetry counter implementation has been moved from the main telemetry package into a new \cmd/internal/telemetry/counter\ package. This change introduces a dedicated API for managing counters, including functions to open counter files, increment named counters, create stack counters, and count flag usage. A corresponding bootstrap stub package ensures the build process remains functional during bootstrapping by providing no-op implementations when the full telemetry dependencies are not yet available.

src/cmd/internal/telemetry · high confidence

Type-checking logic moved into the typecheck package

The type-checking implementation has been reorganized into the new \src/cmd/compile/internal/typecheck\ package. This change introduces a suite of new files—including \builtin.go\, \const.go\, \dcl.go\, \expr.go\, \func.go\, \stmt.go\, and \iexport.go\—which contain the core logic for expression type-checking, constant handling, declaration management, and indexed export/import. A new \mkbuiltin.go\ tool and corresponding test (\builtin\_test.go\) are also added to generate and verify the built-in function declarations.

src/cmd/compile/internal/typecheck · high confidence

Vet is relocated to the standard library and re-architected on the x/tools analysis framework

The vet command has moved from the cmd/ directory into the standard library (src/cmd/vet) and now implements its checks using the golang.org/x/tools/go/analysis suite. This change brings vet under the same modular analyzer infrastructure used by go fix, allowing it to accept configuration from the go command and run as part of go test. The relocation includes updated documentation (doc.go and README) that lists the full suite of available checks and clarifies the criteria for adding new ones, while the test suite has been refactored to validate each analyzer in the suite.

src/cmd/vet · high confidence

Behavioural changes

AMD64 backend refactored to SSA with SIMD support

The AMD64 code generation backend has been rewritten to use the new SSA infrastructure, replacing the legacy backend. This change introduces support for the experimental SIMD feature (GOEXPERIMENT=simd), enabling the compiler to generate optimized vector instructions for operations like AES, FMA, and various data conversions. The refactoring also improves code quality by using 32-bit operands for byte operations, optimizing zeroing routines, and ensuring correct handling of register clobbers and flags.

src/cmd/compile/internal/amd64 · high confidence

AMD64 linker implementation migrated to the new loader-based architecture

The AMD64-specific linker code in src/cmd/link/internal/amd64 has been rewritten to use the new loader APIs, replacing the previous global state and direct symbol manipulation with explicit loader and target contexts. This change introduces new files (asm.go, l.go, obj.go) that handle architecture initialization, text generation, and relocation processing (ELF, Mach-O, PE) using the modern loader interface, enabling better modularity and paving the way for parallelized and memory-mapped output generation.

src/cmd/link/internal/amd64 · high confidence

The ARM-specific linker code in src/cmd/link/internal/arm has been rewritten to use the new loader and target-based APIs (ld.Link, loader.Loader, ld.Target) instead of the legacy global state and \*Link pointer passing. This migration introduces support for PLT trampolines on ARM, corrects the trampoline reachability computation, and aligns the ARM backend with the refactored ELF relocation and symbol handling infrastructure.

src/cmd/link/internal/arm · high confidence

ARM64 backend receives SSA code generation, SIMD intrinsics, and spill-pairing optimizations

The Go compiler's ARM64 backend now generates code via the SSA framework, replacing the legacy backend. This change introduces support for ARM64 NEON and SVE SIMD intrinsics (including arithmetic, logical, and conversion operations) and adds a post-SSA optimization pass that fuses adjacent single-register load/store instructions into efficient LDP/STP pair instructions. It also includes specific fixes for floating-point comparison flags and sign extension in paired 32-bit loads to ensure correct behavior.

src/cmd/compile/internal/arm64 · high confidence

Assemble flags are now managed by a dedicated internal package

The assembler's command-line flag definitions (such as -o, -shared, -dynlink, -e, -gensymabis, -p, -spectre, -std, -D, -I, -v, -d, and -S) have been extracted into a new internal package (src/cmd/asm/internal/flags). This change centralizes the flag parsing and usage message logic, ensuring consistent handling of options like generating shared library code, supporting dynamic linking, limiting error counts, and enabling spectre mitigations.

src/cmd/asm/internal/flags · high confidence

Clarified unsafe package documentation and behavior

The unsafe package documentation has been significantly expanded and clarified to define valid usage patterns for Pointer conversions, including pointer arithmetic, alignment, and interactions with syscall and reflect packages. The documentation now explicitly states that unsafe programs are not protected by Go 1 compatibility guidelines and clarifies that Sizeof includes field alignment padding. Additionally, the spec change ensures that unsafe.Slice((\*T)(nil), 0) returns a nil slice, aligning with expected behavior for zero-length slices.

src/unsafe · high confidence

Compiler introduces per-iteration loop variables for Go 1.22+

The Go compiler now implements the new loop variable semantics where loop variables in \for\ and \range\ statements are distinct per iteration rather than shared across the loop. This change is applied by default when compiling for Go 1.22 and later, ensuring that closures capturing loop variables see the expected per-iteration values. For earlier language versions, the legacy shared-variable behavior is preserved unless explicitly overridden via debug flags or experiments.

src/cmd/compile/internal/loopvar · high confidence

Compiler optimizes returned local variables to reuse result storage

The Go compiler now includes a new optimization pass that rewrites functions to reuse the storage of anonymous result parameters for local variables that are returned directly. This change eliminates unnecessary copies when a function declares a local variable, assigns a value to it, and returns it, allowing the compiler to use the result slot's memory location directly. This optimization applies to simple cases where the local variable is not captured by closures, does not have its address taken (unless the result also needs to be addressable), and is returned consistently across all return paths in the function.

src/cmd/compile/internal/rewriteresults · high confidence

Compiler staticdata package refactored into data.go and embed.go

The internal compiler package \cmd/compile/internal/staticdata\ has been restructured into two new files, \data.go\ and \embed.go\. This change introduces helpers for managing static symbols, including content-addressable string literals and file contents, and implements the logic for emitting \//go:embed\ variables (strings, byte slices, and \embed.FS\) into the object file. Users benefit from a cleaner internal compiler architecture that supports the embed feature and content-addressable symbol optimization.

src/cmd/compile/internal/staticdata · high confidence

Disallow linkname of newly added internal functions

The Go toolchain now prevents the use of //go:linkname to reference specific internal runtime functions, such as newcoro. This change is enforced by adding test cases that verify the linker rejects assembly and Go code attempting to link against these restricted internal symbols, ensuring that internal implementation details remain encapsulated and cannot be bypassed via linkname directives.

_src/cmd/link/testdata/linkname/coro\asm, src/cmd/link/testdata/linkname/p · high confidence

Documentation for new language features and type aliases

The built-in package documentation now includes entries for the new \any\ and \comparable\ type aliases, as well as the \min\, \max\, and \clear\ built-in functions. It also clarifies the behavior of \len\ and \cap\ when arguments are constant, documents the specific allocation behavior of \make\ for maps and slices, and updates the \panic\ documentation to reference \PanicNilError\.

src/builtin · high confidence

Enhanced lock-copy detection for Go 1.22+ loop variables

The vendored copylock analyzer in the Go vet tool now detects when a lock value is inadvertently copied during Go 1.22+ for-loop iterations. This change updates the internal analysis logic to recognize that loop variables are implicitly copied on each iteration, preventing false negatives where locks inside loop variables were previously missed. Users will now receive warnings for this specific pattern, improving the accuracy of static analysis for code targeting newer Go versions.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock · high confidence

Extended module information exposed in go list output

The go list command now exposes additional module metadata in its JSON output, including the path to the go.mod file (GoMod), the Go version used in the module (GoVersion), retraction status (Retracted), deprecation messages (Deprecated), and checksums for both the module and its go.mod file (Sum and GoModSum). This allows users to programmatically inspect module provenance, validity, and replacement details directly from the list command.

src/cmd/go/internal/modinfo · high confidence

Extracted HTTP request interception logic into a dedicated package

The HTTP request interception logic previously embedded in the web package has been extracted into a new \src/cmd/go/internal/web/intercept\ package. This change introduces an \Interceptor\ struct and associated functions (\EnableTestHooks\, \DisableTestHooks\, \URL\, \Request\) that allow the Go command to redirect outgoing HTTP requests to a test host. This refactoring isolates the mechanism for modifying request hosts and schemes, making the codebase more modular and easier to maintain.

src/cmd/go/internal/web/intercept · high confidence

Extracted LookPath into a separate pathcache package

The internal logic for caching executable lookups has been moved from the cmd/go package into a new dedicated pathcache package. This change introduces a concurrent-safe cache wrapper around os/exec.LookPath, allowing multiple goroutines to perform path lookups efficiently without redundant system calls.

src/cmd/internal/pathcache · high confidence

Go 1.28 bootstrap requires Go 1.26.0

The Go 1.28 release now requires Go 1.26.0 as the minimum bootstrap toolchain version. This is enforced by the \cmd/dist\ build tool, which checks the available Go version during the build process and will fail if an older version is used. This change ensures that the bootstrap process uses a sufficiently modern Go toolchain to compile the new release.

src/cmd/dist · high confidence

Go telemetry upload process now includes date-based filtering and improved concurrency safety

The vendored telemetry upload module has been updated to enforce stricter rules on which data is reported. Reports containing data on or before the configured 'as-of' date are now excluded from upload, and reports older than 21 days are automatically discarded. The upload logic also implements file locking to prevent duplicate uploads when multiple processes run simultaneously, and adds caching to avoid re-parsing count files.

src/cmd/vendor/golang.org/x/telemetry/internal/upload · high confidence

Improved error messages for generic type constraints and inference

The type checker in cmd/compile/internal/types2 now provides clearer, more specific error messages when generic code fails to satisfy type constraints or when type inference encounters issues. Users will see better diagnostics for problems such as missing methods, invalid constraint usage, and inference failures, helping them debug generic code more effectively.

src/cmd/compile/internal/types2 · high confidence

Introduce cmd/compile/internal/base package for compiler configuration and debugging

The compiler's command-line flag parsing, debugging options, and error reporting logic have been consolidated into a new internal package (cmd/compile/internal/base). This change centralizes the definition of compiler flags (such as -d, -L, -race, and PGO-related settings) and provides a unified mechanism for hash-based debugging (GOSSAHASH) to help isolate compiler miscompilations. It also introduces startup heap adjustment logic to improve compilation performance by temporarily boosting GOGC, and standardizes how linker symbols are generated for compiler-internal packages.

src/cmd/compile/internal/base · high confidence

Introduce compact source position representation with column support

The compiler's internal source position handling in \src/cmd/internal/src\ has been replaced with a new, more compact encoding. A new \XPos\ type stores positions as a file index and a compressed line/column value, significantly reducing memory usage compared to the previous \Pos\ structure. The system now tracks both line and column numbers, allowing error messages and debug information to display precise column locations. It also supports relative positions derived from \//line\ directives, showing both the mapped location and the original source context in debug output.

src/cmd/internal/src · high confidence

Introduce custom flag parsing package for Go commands

The Go toolchain now includes a new internal package, cmdflag, to handle command-line flag processing for tools like 'go test' and 'go vet'. This package provides a custom parser that distinguishes between flags intended for the Go command itself and those passed through to the underlying binary, supporting features like the '--' terminator and specific error handling for undefined flags. This change centralizes and standardizes how these commands parse their respective command-line arguments.

src/cmd/go/internal/cmdflag · high confidence

Introduce dedicated HTTP client package with security and file URL support

The \cmd/go\ tool now uses a new internal \web\ package to manage network requests, replacing the previous ad-hoc HTTP handling. This change introduces a dedicated HTTP client that sets a specific User-Agent string, supports \file://\ URLs for local resources, and enforces security by rejecting redirects from HTTPS to HTTP origins. It also improves error reporting by including snippets of plain-text server responses in error details and persists the \go-get=1\ query parameter across redirects.

src/cmd/go/internal/web · high confidence

Introduce generated SSA lowering rules and op definitions for 386 and AMD64

The compiler now uses generated rule files (386.rules, AMD64.rules) and op definitions (386Ops.go) to lower generic SSA operations to 386 and AMD64 machine instructions. This change adds specific lowering logic for arithmetic, shifts, comparisons, and bit-manipulation operations (such as Ctz64 and BitLen) on these architectures, replacing previous hand-written or less structured lowering passes with a centralized, generated approach.

_src/cmd/compile/internal/ssa/\gen · high confidence

Introduce interleaved devirtualization and inlining pass

The Go compiler now includes a new \interleaved\ package that implements a combined devirtualization and inlining pass. This change replaces the previous separate phases with an iterative algorithm that resolves call targets and inlines functions in a single loop until a fixed point is reached, allowing inlining decisions to immediately inform subsequent devirtualization steps and vice versa.

src/cmd/compile/internal/inline/interleaved · high confidence

Introduce modular VCS codehost package for Go module fetching

The Go toolchain now uses a new \codehost\ package to manage interactions with version control systems (Git, Mercurial, SVN) during module downloads. This change introduces a unified \Repo\ interface and specific implementations (e.g., \gitRepo\, \svnRepo\) that handle repository initialization, tag listing, file reading, and zip extraction. Key behavioral updates include support for Git SHA-256 object hashes, improved error handling for VCS operations, and the ability to cache VCS metadata to optimize repeated module lookups.

src/cmd/go/internal/modfetch/codehost · high confidence

Introduce typebits package for GC pointer bitmap generation

The compiler now uses a new internal \typebits\ package to generate garbage collection pointer bitmaps for types. This change introduces logic to correctly identify pointer fields within various Go types (such as pointers, strings, interfaces, slices, arrays, and structs) and validates alignment constraints during bitmap construction. This ensures the garbage collector accurately scans stack and heap memory for live pointers.

src/cmd/compile/internal/typebits · high confidence

Introduction of new ABI parameter passing utilities

The compiler now uses a new \abiutils\ package to calculate stack layouts and register assignments for function parameters and results. This change introduces \ABIParamResultInfo\ and \ABIParamAssignment\ structures to explicitly track whether arguments are passed in registers or on the stack, replacing previous ad-hoc calculations. Users benefit from more accurate and consistent handling of function call conventions, particularly for complex types like structs and slices, ensuring that parameter offsets and register allocations align with the internal ABI specification.

src/cmd/compile/internal/abi · high confidence

Linker symbol model refactored into new internal types

The linker's internal symbol representation has been restructured to improve memory efficiency and support the new object file format. The \sym\ package now introduces dedicated types for \CompilationUnit\ (grouping symbols by package/object file), \Library\ (managing imported packages and their symbols), \Segment\ and \Section\ (describing memory layout), and \RelocVariant\ (handling architecture-specific relocation details). The core \SymKind\ type has been expanded to include new categories for FIPS compliance, DWARF5 address tables, and coverage counters, while ABI versioning is now handled via explicit version constants. This refactoring replaces the previous monolithic \sym.Symbol\ structure with a more modular, loader-centric design.

src/cmd/link/internal/sym · high confidence

MIME package rewritten with stricter RFC compliance and DoS protections

The \mime\ and \mime/multipart\ packages have been completely rewritten to enforce stricter RFC 2045/2047/2231 compliance and mitigate denial-of-service risks. \mime/multipart\ now limits memory and inode consumption in \ReadForm\, restricts the number of parts and headers via \GODEBUG\ settings, and prevents CRLF injection by percent-encoding control characters in header values. The \mime\ package introduces a new \WordEncoder\ and \WordDecoder\ for RFC 2047 encoded-words, enforces a 75-character limit on encoded-words, rejects duplicate parameter names, and correctly handles non-ASCII characters in media type formatting. \FormatMediaType\ now supports slash-less types and RFC 2231 parameter encoding, while \ParseMediaType\ ignores trailing semicolons and handles invalid parameters more robustly.

src/mime · high confidence

Move SSA HTML writer to dedicated package and add per-value debug data

The SSA HTML debugging writer has been relocated to the new ssahtml package. This change introduces per-value debug data into the generated HTML dumps, providing more detailed information about individual SSA values for users inspecting compiler output.

src/cmd/compile/internal/ssa/ssahtml · medium confidence

New ARM64 linker implementation

The ARM64 architecture-specific linker code has been rewritten from scratch in the new internal linker package. This change introduces a complete replacement for the previous implementation, featuring updated relocation handling for ELF, Mach-O, and PE formats, support for internal linking on Darwin and Linux, and new alignment and function alignment constants. Users benefit from improved reliability and feature parity with other architectures, including better support for dynamic imports and position-independent executables (PIE) on ARM64.

src/cmd/link/internal/arm64 · high confidence

New Go object file format (go120ld) with content-addressable symbols

The Go compiler and linker now use a new object file format (identified by the magic string "\\x00go120ld") that replaces the previous version. This format introduces content-addressable symbols (hashed and short-hashed definitions) to reduce file size and improve caching, and it stores function metadata (FuncInfo) as auxiliary symbols rather than in a separate block. Builtin function references are now handled via a generated list of special indices instead of name lookups, and relocation types are stored as uint16. The format also adds support for start line numbers in function metadata and removes the legacy funcdataoff block.

src/cmd/internal/goobj · high confidence

New MVS algorithm implementation for module version selection

The Go toolchain now uses a new internal implementation of the Minimal Version Selection (MVS) algorithm in the cmd/go/internal/mvs package. This change introduces a new Graph-based incremental algorithm and a new BuildListError type that provides detailed requirement chains in build list errors, improving the clarity of dependency resolution failures for users.

src/cmd/go/internal/mvs · high confidence

New PGO-driven inlining and scoring heuristics

The inliner now supports profile-guided optimization (PGO) to identify hot call sites and functions, adjusting inlining budgets and thresholds based on execution frequency. It also introduces a new scoring-based heuristic system (controlled by GOEXPERIMENT=newinliner) that evaluates call sites and function properties to determine inlinability, replacing or augmenting previous static rules. This change integrates PGO data into the inlining decision process, allowing the compiler to prioritize inlining in performance-critical paths.

src/cmd/compile/internal/inline · high confidence

New PPC64 linker implementation with PC-relative support and updated alignment

The PPC64 linker backend has been replaced with a new implementation that introduces support for PC-relative instructions and relocations on Power10+ Linux systems, updates function alignment to 16 bytes, and refactors the architecture initialization to use the new loader APIs. This change also corrects the dynamic loader paths for both glibc and musl on ppc64le and ppc64, ensuring proper runtime linking behavior.

src/cmd/link/internal/ppc64 · high confidence

New analyzer suites for go vet and go fix

The vendored x/tools package now exposes explicit analyzer suites for the standard Go tools. The vet package defines the suite of analyzers run by 'go vet', which report diagnostics for real problems but do not necessarily suggest safe fixes. The fix package defines the suite of analyzers run by 'go fix', which produce fixes that are unambiguously safe to apply, currently including buildtag, hostport, inline, and the modernize suite.

src/cmd/vendor/golang.org/x/tools/go/analysis/suite · high confidence

New internal hash package with distinct 32-byte checksums

The compiler toolchain now uses a new internal hash package that provides 32-byte hash functions based on SHA-256 but modified to produce distinct checksums from standard SHA-256. This change replaces previous usage of MD5 and SHA-1, ensuring stronger cryptographic foundations for internal compiler operations while maintaining the same 32-byte output size.

src/cmd/internal/hash · high confidence

New lockedfile package for atomic, cross-process file operations

The Go command now uses a new internal \lockedfile\ package to manage \go.mod\ and \go.sum\ files, replacing the previous \renameio\ approach. This package provides file locking mechanisms that work across processes, ensuring that file modifications are atomic and safe from concurrent access. It includes platform-specific implementations for file locking on Plan 9 and other systems, and supports operations like reading, writing, and transforming file contents while maintaining exclusive locks. This change improves the reliability of the Go command when handling module files in multi-process environments.

src/cmd/go/internal/lockedfile · high confidence

New scoring-based inlining heuristics in the Go compiler

The Go compiler's inlining decision process has been replaced with a new scoring system that analyzes function properties (such as whether a function never returns, its parameter usage, and return value characteristics) and call-site context (such as whether a call is in a loop or on a panic path) to assign scores. This change, located in the \cmd/compile/internal/inline/inlheur\ package, allows the compiler to make more nuanced inlining decisions based on these computed properties rather than simple size or complexity metrics.

src/cmd/compile/internal/inline/inlheur · high confidence

New struct comparison cost model and generation logic

The compiler now uses a new internal package to generate equality checks for structs, strings, and interfaces. This introduces a cost-based heuristic (EqStructCost) that determines whether to use memory-only comparisons or individual field checks, taking into account architecture-specific capabilities like merged loads and alignment constraints. This change alters how the compiler generates equality code for structs, potentially affecting performance characteristics for struct comparisons.

src/cmd/compile/internal/compare · high confidence

New types2-based test importer using unified export data format

The test importer in src/cmd/compile/internal/testimporter has been replaced with a new implementation that supports the 'p' unified export data format. This new importer uses the types2 package analysis framework to read compiled package archives, replacing the previous legacy importer. It handles concurrent package imports with caching and builds packages on-demand when needed for testing.

src/cmd/compile/internal/testimporter · high confidence

New unified architecture definition model in cmd/internal/sys

The Go toolchain introduces a new, centralized representation for target architectures in the \cmd/internal/sys\ package. This change replaces scattered architecture constants with a structured \Arch\ type that explicitly defines properties such as pointer size, register size, byte order, and alignment requirements. It adds support for new architectures including Loong64, Wasm, and MIPS/LE variants, and introduces flags like \CanJumpTable\ and \HasLR\ to enable backend optimizations such as jump tables and link-register handling. A new \InFamily\ method allows code to query architecture families, and a conservative argument length limit is defined for exec commands.

src/cmd/internal/sys · high confidence

New x86 linker implementation for 32-bit architectures

The x86 linker backend has been replaced with a new implementation located in \src/cmd/link/internal/x86\. This change introduces new files (\asm.go\, \l.go\, \obj.go\) that handle architecture-specific initialization, relocation processing, and text generation for 32-bit x86 targets. The new code supports dynamic linking features such as \get\_pc\_thunk\ thunks and PLT setup, and integrates with the new loader API for handling symbols and relocations.

src/cmd/link/internal/x86 · high confidence

Optimized stack allocation for slice backing stores

The Go compiler now applies a stack-allocation optimization to the backing stores of local slices. By analyzing escape behavior and slice exclusivity, the compiler can reuse stack-allocated memory for intermediate allocations during append operations, moving the backing store to the heap only when necessary (e.g., upon return or escape). This reduces unnecessary heap allocations and garbage collection pressure for code patterns involving repeated appends to local slices.

src/cmd/compile/internal/slice · high confidence

Package pattern matching logic moved to internal package with UTF-8 validation

The package pattern matching logic (MatchPattern, MatchSimplePattern, TreeCanMatchPattern) has been relocated from cmd/go/internal/search to the new internal package cmd/internal/pkgpattern to support other commands. Additionally, the pattern matching implementation now validates that input patterns are valid UTF-8 strings before compiling them into regular expressions, preventing potential panics from invalid input.

src/cmd/internal/pkgpattern · high confidence

Refactor coverage fixup into a single unified entry point

The compiler's coverage fixup logic, previously split into separate FixupVars and FixupInit phases, is now consolidated into a single Fixup function. This change simplifies the internal handling of coverage variables by merging the pre-init and post-init registration steps, ensuring that coverage metadata and counter variables are processed in a unified pass during compilation.

src/cmd/compile/internal/coverage · high confidence

Refactored 'go doc' into a modular internal package with pkgsite integration

The 'go doc' command implementation has been restructured into the new 'cmd/go/internal/doc' package, splitting the logic into dedicated files for directory scanning (dirs.go), package parsing (pkg.go), module loading (mod.go), and documentation generation (doc.go). This change introduces a new build process that compiles the 'golang.org/x/pkgsite/cmd/internal/doc' tool (version v0.0.0-20260722200430-7c7eca789259) and runs it as a subprocess to serve HTML documentation via the -http flag, replacing the previous in-process approach. The refactoring also adds support for versioned package lookups (e.g., pkg@version) and improves signal handling to ensure the documentation server exits cleanly on interrupt.

src/cmd/go/internal/doc · high confidence

Refactored 'go env' into a dedicated internal package

The implementation of the 'go env' command has been moved into a new internal package (src/cmd/go/internal/envcmd), separating the command logic from the main cmd/go entry point. This change introduces a structured environment variable list (MkEnv) that explicitly tracks which values are changed from defaults, enabling the new -changed flag to filter output. It also adds support for the -json flag to output environment data in JSON format, and ensures that variables like GODEBUG, GOEXPERIMENT, and GOTOOLCHAIN are correctly reported with their changed status. The refactoring includes comprehensive fuzz testing for environment variable escaping to prevent shell injection issues.

src/cmd/go/internal/envcmd · high confidence

Refactored VCS resolution logic into the internal/vcs package

The repository resolution logic previously located in internal/get has been moved to the new internal/vcs package. This change consolidates version control system handling, including the parsing of go-import meta tags (with support for optional subdirectories) and the identification of VCS roots, into a single dedicated location. The internal/vcs package now manages the discovery of repository roots and the mapping of import paths to specific VCS types (Git, Mercurial, Subversion, Fossil), while the internal/get package is updated to delegate to this new structure.

src/cmd/go/internal/vcs · high confidence

Refactored compiler reflectdata package for type descriptor generation

The internal reflectdata package has been reorganized into distinct files (alg.go, helpers.go, map.go, reflect.go) to improve maintainability and support new compiler features. This change introduces optimized generation of hash and equality functions for arrays and structs, including unrolled loops for better performance. It also adds support for the new map implementation layout (KKKKVVVV vs KVKVKVKV) via the MapSplitGroup experiment, and refactors interface type conversion logic to use ITabAddrAt. Additionally, it removes legacy mechanisms like MarkUsedIfaceMethodIndex and simplifies the handling of generic type descriptors and method wrappers.

src/cmd/compile/internal/reflectdata · high confidence

The \cmd/go/internal/imports\ package has been restructured into dedicated files (\build.go\, \read.go\, \scan.go\, \tags.go\) to improve maintainability and correctness. \ScanDir\ now resolves symlinks to their targets before filtering, ensuring that the properties of the actual file (rather than the link) determine inclusion. Build-tag evaluation now correctly includes tool tags (e.g., \go1.21\) via \ToolTags\, and the \AnyTags\ helper uses \sync.OnceValue\ for safe concurrent access. The import reader now ignores UTF-8 BOMs at the start of source files, and \ScanDir\ skips hidden files (those starting with a dot).

src/cmd/go/internal/imports · high confidence

Refactored liveness analysis with new utility packages and argument tracking

The liveness analysis subsystem has been restructured to improve modularity and precision. New helper packages have been introduced: 'intervals.go' provides an 'Intervals' type for managing sorted, disjoint variable lifetime ranges, and 'bvset.go' offers a hash-based set for uniquifying bit vectors to reduce redundancy. Additionally, 'arg.go' implements dedicated tracking for register argument spill slots, emitting precise FUNCDATA and PCDATA information for runtime traceback, while 'mergelocals.go' enhances the stack slot merging logic to better identify and overlap safe local variables. These changes refine how the compiler tracks variable lifetimes and optimizes stack usage.

src/cmd/compile/internal/liveness · high confidence

Refactored module fetching into a new Fetcher-based architecture

The module fetching subsystem has been restructured to use a new Fetcher type, replacing the previous State-based design. This change introduces a dedicated caching layer (cache.go) that manages the module download directory, handles file locking for concurrent access, and validates cache integrity via ziphash files. The new architecture consolidates global variables, improves error handling for read-only filesystems, and integrates with the Go checksum database and proxy protocols through a cleaner interface. Users benefit from more robust module downloads, better handling of partial extractions, and improved performance through request deduplication.

src/cmd/go/internal/modfetch · high confidence

Refactored module loading into a structured, lazy-loading architecture

The module loading logic in the Go command has been restructured to support lazy loading and improved concurrency. The internal state has been replaced with a new \Requirements\ type that manages the module graph and root modules, and the \Loader\ type now handles package loading separately from module graph construction. This change introduces a more robust error model with structured errors for missing imports, ambiguous imports, and direct imports from implicit dependencies, providing clearer guidance to users when module resolution fails.

src/cmd/go/internal/modload · high confidence

Refactored static initialization scheduling logic

The static initialization engine in the Go compiler has been refactored to improve reliability and performance. This change introduces a new scheduling mechanism (sched.go) that decomposes assignment statements into static and dynamic parts, allowing the compiler to move more global variable initializations into static data sections rather than runtime init functions. Key improvements include better handling of inlined calls, string concatenation, and integer conversions during static init, as well as fixes for panics in interface conversions and global new(expr) calls. The refactoring also addresses package-initialization order issues and speeds up compilation of large init functions by reducing dynamic overhead.

src/cmd/compile/internal/staticinit · high confidence

Refined keep-alive semantics for b.Loop in Go benchmarks

The Go compiler's handling of the \b.Loop()\ benchmark construct has been updated to more precisely manage variable liveness. The new \bloop\ package logic now explicitly excludes compiler-synthesized bookkeeping variables (those starting with '\#') from keep-alive tracking, preventing unnecessary retention of internal state. It also ensures that only addressable nodes are kept alive and avoids extraneous heap allocations caused by autotmp variable scope issues. Additionally, the pass now correctly preserves blank nodes and avoids unnecessary interface conversions, resulting in more accurate benchmark measurements with reduced overhead.

src/cmd/compile/internal/bloop · high confidence

Refined signal forwarding for 'go tool' subprocesses

The 'go tool' command now forwards a specific, limited set of signals (SIGHUP, SIGINT, SIGQUIT, and SIGTERM) to child processes instead of potentially forwarding all signals. This change is implemented via new platform-specific files (signal.go, signal\_js.go, signal\_plan9.go) that define the exact signals to forward, ensuring consistent behavior across different operating systems and preventing unintended signal propagation that could disrupt the parent go command.

src/cmd/go/internal/tool · high confidence

Refined type-checker error reporting and test structure

The type-checker's error reporting for invalid identifiers has been improved to prevent spurious 'undefined' errors and ensure deterministic output for initialization cycles. New test cases in the local test suite verify that invalid characters in identifiers are reported correctly without cascading errors, that package member lookups distinguish between undefined names and unexported names, and that initialization cycles are reported deterministically.

src/cmd/compile/internal/types2/testdata/local · medium confidence

Regexp engine reimplementation with one-pass and backtracking modes

The regexp package has been rewritten to use a new execution engine that automatically selects between a fast 'one-pass' mode for simple patterns and a backtracking mode for complex ones, replacing the previous NFA-based approach. This change improves performance for many common use cases and ensures linear-time execution guarantees. The package now includes comprehensive examples for all public methods, new test coverage against the RE2 exhaustive test suite, and several bug fixes for edge cases in pattern matching and compilation.

src/regexp · high confidence

Relocated parallel execution helpers to cmd/internal/par

The parallel execution utilities (Queue, Work, Cache, and ErrCache) have been moved from cmd/go/internal/par to cmd/internal/par. This relocation makes these internal helpers available to other command-line tools within the Go toolchain, not just the go command, while keeping them internal to the cmd package.

src/cmd/internal/par · high confidence

Relocated robust I/O retry logic to a shared internal package

The Windows-specific robust I/O helper (previously in cmd/go/internal/robustio) has been moved to the shared cmd/internal/robustio package. This package provides wrappers for Rename, ReadFile, and RemoveAll that transparently retry ephemeral errors on Windows and Darwin, significantly reducing spurious failures during concurrent file operations. On non-Windows/Darwin platforms, the wrappers delegate directly to the standard library without retries.

src/cmd/internal/robustio · high confidence

Relocation of coverage command definitions to internal package

The \covcmd\ package, which defines the data structures (\CoverPkgConfig\, \CoverFixupConfig\) and helper functions (\MetaFileForPackage\) used for passing configuration between the Go command and the cover tool during instrumentation, has been moved from the standard library's internal directory to \src/cmd/internal/cov/covcmd\. This change reorganizes the internal implementation of the coverage tooling without altering the external behavior of coverage reporting for users.

src/cmd/internal/cov/covcmd · high confidence

Remove 2GB allocation limit in bit vector bulk creation

The \NewBulk\ function in the compiler's internal bit vector package no longer enforces a 2GB allocation limit. This allows the compiler to allocate larger bit vectors for tracking liveness and other internal states, which is necessary to support larger functions or more complex compilation units without hitting artificial size constraints.

src/cmd/compile/internal/bitvec · high confidence

Rename PGO IR package and introduce IR-based call graph structures

The internal PGO IR package has been renamed from 'pgo' to 'pgoir'. This change introduces the IRGraph, IRNode, and IREdge data structures, which associate PGO profile data with the compiler's Intermediate Representation (IR) by mapping functions and call edges to specific IR nodes and line offsets. This enables the compiler to leverage profile-guided optimization data more precisely during IR-level transformations.

src/cmd/compile/internal/pgoir · high confidence

Runtime behavior and stability improvements

The runtime has been updated with numerous fixes and behavioral changes to improve stability and correctness. Key changes include fixing race conditions in timer and event handling, correcting stack trace output for various architectures, and resolving issues with signal handling on Windows and Darwin. The garbage collector has been tuned to better handle memory limits and CPU utilization, while the scheduler has been adjusted to prevent deadlocks and improve preemption. Additionally, several platform-specific issues have been addressed, including fixes for AIX, Solaris, and various ARM architectures, ensuring more robust operation across different environments.

src/runtime · high confidence

SSA compiler backend becomes the default and unconditional compilation path

The Go compiler now uses the SSA-based backend for all compilation by default, removing the previous experimental opt-in requirement. This change makes the SSA backend the standard for code generation, meaning all Go programs are compiled using this new infrastructure, which brings improved optimization, better debugging information, and support for new architectures that were previously unavailable or experimental.

src/cmd/compile/internal/ssa · high confidence

Script test engine relocated to cmd/internal/script with improved interrupt handling

The script test engine has been moved from cmd/go/internal/script to cmd/internal/script, making it available for reuse across other cmd packages. This relocation includes a correction to the InterruptCmd implementation to properly handle process interruption on Windows (using Kill instead of Signal) and Plan 9, along with the addition of a fuzz test for the quoteArgs function to improve robustness against edge-case inputs.

src/cmd/internal/script · high confidence

Search results now report matching errors separately from package lists

The Go command's package search mechanism has been refactored to distinguish between the results of pattern matching and the actual loading of packages. The new \Match\ struct in \src/cmd/go/internal/search\ explicitly records errors encountered during the matching process (such as permission denied or invalid paths) in an \Errs\ field, separate from the list of matched packages (\Pkgs\). This allows users to see that a pattern matched some packages but that the results may be incomplete due to errors, rather than silently ignoring the failures or crashing. Additionally, the search now supports meta-patterns like 'work' and 'all', and correctly handles symlinks and permission errors during directory traversal.

src/cmd/go/internal/search · high confidence

Sort package refactored to delegate to the slices package and introduce new generic search functions

The sort package has been restructured to forward concrete slice sorting and checking operations (Ints, Float64s, Strings, IntsAreSorted, etc.) to the new slices package for better performance and ergonomics. Additionally, the package now provides new generic search capabilities, including the Find function for binary search with equality checks, and convenience wrappers SearchInts, SearchFloat64s, and SearchStrings. The package also introduces Slice, SliceStable, and SliceIsSorted to allow sorting and checking arbitrary slices using custom less functions without implementing the Interface.

src/sort · high confidence

Split PE loader into a dedicated package with SEH support

The PE/COFF file reader has been refactored into its own package (loadpe), separating it from the main linker logic. This change includes the addition of Structured Exception Handling (SEH) support for AMD64, which processes .pdata and .xdata sections to ensure exception handlers are correctly retained during dead code elimination.

src/cmd/link/internal/loadpe · high confidence

Standardize repository configuration and documentation

The repository now enforces consistent line endings by treating all files as binary in .gitattributes (except .bat files which use CRLF), replaces the legacy .hgignore with a comprehensive .gitignore, and introduces standard project files including CONTRIBUTING.md, LICENSE, PATENTS, SECURITY.md, and a root go.env that sets default module proxy and toolchain settings.

(repo-wide) · high confidence

Stricter enforcement of linkname restrictions

The Go toolchain now enforces tighter security rules on the //go:linkname directive. Access to specific runtime internals such as addmoduledata, freegc, coroswitch, corostart, newcoro, systemstack, and builtin symbols like mapaccess1 is now prohibited. While some legacy pull linknames (e.g., noescape, fastrand) remain temporarily allowed for compatibility, the toolchain now distinguishes between 'push' and 'pull' linknames, allowing only push-style linknames by default. These changes are verified through new test cases in the linkname testdata directory.

src/cmd/link/testdata/linkname · high confidence

Suffix array index now supports larger datasets and handles corruption safely

The index/suffixarray package has been rewritten to use a linear-time SAIS algorithm, making index construction 3-10X faster while using half the memory. It now supports datasets larger than 2GB by automatically switching to 64-bit indices when needed, and it returns a clear error instead of panicking when reading corrupted index data.

src/index · high confidence

Support for gccgo/GoLLVM mangler v3 symbol encoding

The new internal \cmd/internal/pkgpath\ package enables the Go toolchain to detect and use the third-generation symbol mangling scheme in gccgo and GoLLVM compilers. By compiling a small test file and inspecting the output, the toolchain now automatically selects the appropriate encoding function (v1, v2, or v3) to convert package paths into unique, collision-free symbols, ensuring compatibility with newer compiler versions that use the \go\0l\...\ mangling style.

src/cmd/internal/pkgpath · high confidence

TLS 1.3 enabled by default and minimum version raised to 1.2

The crypto/tls package now enables TLS 1.3 by default and sets the minimum supported protocol version to TLS 1.2, effectively disabling older, less secure versions like TLS 1.0 and 1.1. This change improves security posture by ensuring that connections use modern cryptographic standards, while maintaining compatibility with current servers and clients that support TLS 1.2 or higher.

src/crypto · high confidence

Tar package rewritten with support for PAX, GNU, and USTAR formats

The \archive/tar\ package has been completely rewritten to support multiple tar archive formats, including USTAR, PAX, and GNU. This change introduces a new \Format\ type and allows users to read and write archives with extended features such as sub-second timestamps, sparse files, and arbitrary-length filenames. The \Reader\ now handles PAX and GNU-specific headers transparently, while the \Writer\ supports explicit format selection. Security improvements include the introduction of \ErrInsecurePath\ to detect non-local file paths, controlled by the \tarinsecurepath\ GODEBUG setting. The package also adds fuzz testing and improves error handling for malformed archives.

src/archive/tar · high confidence

Telemetry mode file format and platform support updated

The vendored telemetry package now records the date alongside the mode in the configuration file (e.g., "on 2024-01-01"), allowing the system to track when the mode was last changed and reset upload timeouts accordingly. Additionally, telemetry is now explicitly disabled on specific platforms (OpenBSD, Solaris, Android, Illumos, JS, WASI, Plan 9, and MIPS architectures) to avoid known bugs or lack of support.

src/cmd/vendor/golang.org/x/telemetry/internal/telemetry · high confidence

The stdversion analyzer now provides precise version context in diagnostics

The stdversion analyzer, which flags uses of standard library symbols that are too new for the current Go version, has been updated to improve the clarity of its error messages. When a diagnostic is reported, it now explicitly distinguishes whether the version constraint originates from the file's build tag or the module's go.mod directive, helping users quickly identify and resolve version mismatches.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stdversion · high confidence

Unicode tables updated to version 17.0.0

The \unicode\ package's generated data tables have been updated to reflect the Unicode Standard version 17.0.0. This update refreshes the underlying character classification data, including categories, scripts, and properties, ensuring that functions like \IsLetter\, \IsDigit\, and \IsSpace\ align with the latest Unicode specifications. The \unicode/utf16\ and \unicode/utf8\ packages remain compatible with these updated tables.

src/unicode · high confidence

Unified 'go vet' and 'go fix' commands with dynamic flag support

The 'go vet' and 'go fix' commands are now implemented in a shared codebase, allowing 'go fix' to be invoked directly. Both commands now dynamically query the underlying analysis tool (via the -vettool/-fixtool flags) to discover and accept its specific flags, rather than relying on a static whitelist. This enables seamless integration with external analysis tools built on the unitchecker protocol and ensures that flags passed via GOFLAGS are correctly forwarded to the tool.

src/cmd/go/internal/vet · high confidence

Unified object file parsing for profiling and debugging tools

The internal \cmd/internal/objfile\ package now provides a single, unified interface for reading symbol tables, line number information, and raw text sections from various executable formats (ELF, Mach-O, PE, Plan 9, and XCOFF). This change consolidates previously scattered parsing logic, allowing tools like \cmd/pprof\, \cmd/addr2line\, and \cmd/nm\ to reliably access debug and symbol data across all supported platforms and architectures.

src/cmd/internal/objfile · high confidence

Update editor and shell support references to Go Wiki

The misc/editors file now directs users to the official Go Wiki page for information on plugins and support for editors and shells, replacing previous references to code.google.com.

misc · high confidence

Updated API documentation for Go generics and deprecation markers

The API documentation generator now correctly captures and displays Go generic type parameters (e.g., \Pair\[T1, T2\]\) and their constraints in the public API signature. It also includes deprecation notices for functions marked with \// Deprecated:\ comments, such as \Clone\, ensuring users are aware of discouraged usage.

src/cmd/api/testdata/src/pkg/p4 · high confidence

Updated test data helpers to use modern Go APIs and new module cache path

The test helper scripts addmod.go and savedir.go in src/cmd/go/testdata have been updated to use the standard library's os.ReadFile, os.WriteFile, os.MkdirTemp, and filepath.WalkDir instead of older or internal equivalents. Additionally, addmod.go now reads module metadata from the new module cache location at $GOPATH/pkg/mod/cache/download, reflecting the move of the module cache from $GOPATH/src/mod to $GOPATH/pkg/mod.

src/cmd/go/testdata · high confidence

Updated vendored ARM64 assembler library

The vendored copy of golang.org/x/arch/arm64 has been updated to the latest upstream version. This brings in improvements to the instruction decoding logic and argument handling for the ARM64 architecture, ensuring better compatibility with newer instruction encodings and more accurate disassembly output for Go tooling that relies on this package.

src/cmd/vendor/golang.org/x/arch/arm64 · high confidence

Updated vendored RISC-V 64-bit disassembler library

The vendored copy of golang.org/x/arch/riscv64 has been updated to a newer version, introducing support for RISC-V Vector (RVV) extensions and Compressed (C) instructions. This update adds new argument types for vector registers (V0–V31) and mask registers, expands the instruction tables to include vector operations (such as VADD, VFMADD) and compressed instructions, and updates the GNU and Plan9 syntax formatters to correctly render these new instruction formats.

src/cmd/vendor/golang.org/x/arch/riscv64 · high confidence

Updated vendored buildtag analyzer for //go:build directive checks

The vendored golang.org/x/tools buildtag analyzer has been updated to improve the validation of //go:build and // +build directives. This change refines how the vet tool detects and reports issues with build constraints, ensuring stricter compliance with Go's build tag syntax rules in source files.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag · high confidence

Updated vendored demangle library in pprof

The vendored copy of github.com/ianlancetaylor/demangle used by the pprof command has been updated. This change brings in the latest source code, including support for new demangling options and improved handling of Rust symbol names, ensuring that pprof can correctly display human-readable names for C++ and Rust symbols in profiles.

src/cmd/vendor/github.com/ianlancetaylor · high confidence

Updated vendored diff and LCS algorithm libraries

The vendored copy of golang.org/x/tools/internal/diff has been updated to a newer version. This brings in a refactored longest-common-subsequence (LCS) implementation in the lcs subpackage, which now supports forward, backward, and two-sided Myers' diff algorithms to better control diff size for editor use cases. The diff package itself now includes a Merge function to combine two ordered lists of edits, handling conflicts and coalescing identical changes, and the unified diff output logic has been updated to align with these internal changes.

src/cmd/vendor/golang.org/x/tools/internal/diff · high confidence

Updated vendored gcexportdata with new export format support and deprecations

The vendored golang.org/x/tools/go/gcexportdata package has been updated to support the new indexed export format ('i') introduced by 'go list -export' and to drop support for the legacy binary formats ('c', 'd', 'v') used by Go compilers up to version 1.10. The Read function now explicitly rejects these older binary formats, while continuing to support the indexed format (used by the new tooling and Go up to 1.19) and the unified format (Go 1.20+). Additionally, several functions including Find, NewReader, and NewImporter are now marked as deprecated in favor of the higher-level golang.org/x/tools/go/packages API, reflecting a shift in recommended usage patterns for reading package export data.

src/cmd/vendor/golang.org/x/tools/go/gcexportdata · high confidence

Updated vendored golang.org/x/mod library

The Go toolchain now uses an updated version of the vendored golang.org/x/mod library. This update includes improvements to the go.mod parser and formatter, such as more consistent handling of indirect dependencies in go.mod files for Go 1.17+, fixes for editing '//indirect' comments, and stricter validation for version arguments in 'go mod edit'. It also adds support for new go.mod directives like 'toolchain' and 'godebug', and improves the handling of ignore directives.

src/cmd/vendor/golang.org/x/mod/modfile · high confidence

Updated vendored golang.org/x/text to Unicode 17.0.0

The vendored copy of golang.org/x/text has been updated to align with Unicode 17.0.0. This update refreshes the internal case-mapping tables and data structures used by the Go toolchain's text processing capabilities, ensuring that case folding, uppercasing, lowercasing, and title-casing operations adhere to the latest Unicode standards and specifications.

src/cmd/vendor/golang.org/x/text · high confidence

Updated vendored golang.org/x/tools AST inspector with Go 1.23 iterator support

The vendored golang.org/x/tools package in the Go command source has been updated to a newer revision, bringing significant changes to the AST inspector. The inspector now includes a new Cursor type that enables efficient navigation of the syntax tree in all directions (parent, children, siblings, descendants) and provides a GoString representation of the traversal path. Additionally, for Go 1.23 and later, the inspector exposes iterator-based APIs (PreorderSeq and All) that allow using range loops over AST nodes, offering a more idiomatic and flexible way to traverse and filter syntax trees compared to the traditional callback-based methods.

src/cmd/vendor/golang.org/x/tools/go/ast/inspector · high confidence

Updated vendored golang.org/x/tools AST utilities

The vendored copy of golang.org/x/tools/internal/astutil has been updated to a newer revision, introducing several new utility functions for Go AST manipulation. This includes CloneNode for deep-copying AST nodes, Deprecation and Directives for parsing doc comments and tool directives, and cursor helpers like UnparenCursor for simplifying expression traversal. Additional utilities cover structural equality checks (Equal, EqualSyntax), flattening field lists (FlatFields), computing free variable names (free package), purging function bodies for faster parsing (PurgeFuncBodies), mapping positions within string literals, unpacking receiver types, and general range/selection helpers. These changes enhance the capabilities of tools relying on this vendored package for static analysis and code transformation.

src/cmd/vendor/golang.org/x/tools/internal/astutil · high confidence

Updated vendored golang.org/x/tools refactor package

The vendored copy of golang.org/x/tools/refactor has been updated to a newer commit (incorporating changes from x/tools@68724af, 89ed5c3, and 5d7afbc08aec). This update includes the addition of the new 'satisfy' sub-package (find.go), which inspects type-checked ASTs to report type constraints where one type satisfies an interface, a capability used by refactoring tools to preserve type relationships during code transformations.

src/cmd/vendor/golang.org/x/tools/cover, src/cmd/vendor/golang.org/x/tools/refactor · medium confidence

Updated vendored golang.org/x/tools to support newer Go export data formats

The vendored copy of golang.org/x/tools in src/cmd/vendor has been updated to a newer commit, bringing in significant changes to the gcimporter and pkgbits packages. These changes introduce support for reading the Unified IR export data format (used by recent Go compilers) alongside the older indexed format, adding new files like ureader.go and bimport.go to handle the new bitstream decoding. This ensures the Go toolchain can correctly import packages compiled with newer versions of the compiler that use the updated export data structure.

src/cmd/vendor/golang.org/x/tools/internal/gcimporter, src/cmd/vendor/golang.org/x/tools/internal/pkgbits · high confidence

Updated vendored golang.org/x/tools typeparams utilities

The vendored copy of golang.org/x/tools/internal/typeparams has been updated to a newer revision. This brings in improved utilities for handling Go generics, including functions to unpack and pack index expressions, check for type parameters, and compute normalized structural type restrictions (terms) for interfaces and unions. It also adds support for determining the core type of a type and detecting free type parameters within complex types, enhancing the Go toolchain's ability to analyze and process generic code.

src/cmd/vendor/golang.org/x/tools/internal/typeparams · high confidence

Updated vendored golang.org/x/tools with new inlining analysis capabilities

The vendored copy of golang.org/x/tools in src/cmd/vendor has been updated to a newer commit, introducing a comprehensive refactoring package for function inlining. This update adds new internal analysis components—including callee effect tracking, escape analysis, and fallible constant detection—that enable tools like the modernize analyzer to safely inline function calls by preserving semantic correctness, handling side effects, and managing complex parameter substitutions.

src/cmd/vendor/golang.org/x/tools/internal/refactor/inline · high confidence

Updated vendored printf analyzer with new documentation and type-checking logic

The vendored golang.org/x/tools printf analyzer has been updated to include a new doc.go file detailing its capabilities, such as checking format string consistency for fmt.Printf and inferred wrappers, and enforcing that the %w verb in fmt.Errorf receives an error type rather than a pointer. The implementation in printf.go and types.go has been refreshed to support these checks, including specific handling for type parameters and interface methods in Go 1.26+ and 1.27+ contexts.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf · high confidence

Updated vendored x/tools versions package with new Go version predicates

The vendored golang.org/x/tools/internal/versions package has been updated to support newer Go language versions (up to Go 1.27) and provides new helper functions for tools to determine file-specific Go versions. This includes the addition of AtLeast and Before predicates in features.go to enable or disable behaviors based on Go release milestones, and a FileVersion function in types.go that retrieves the Go version for an AST file, prioritizing the file's own version annotation over the package or toolchain version. The underlying version parsing logic in gover.go and versions.go has also been refreshed to handle these new version constants and ensure correct comparison semantics for pre-release and patch versions.

src/cmd/vendor/golang.org/x/tools/internal/versions · high confidence

Updated vendored x/tools with new atomic analyzer and improved loopclosure checks

The vendored golang.org/x/tools dependency has been updated, introducing a new 'atomic' static analysis pass that detects non-atomic assignments to sync/atomic variables (e.g., x = atomic.AddUint64(&x, 1)). The 'loopclosure' analyzer has also been updated to account for Go 1.22's change in loop variable scoping, suppressing warnings for code running on Go 1.22+ while continuing to flag issues in earlier versions, and now includes checks for parallel subtests using t.Run with t.Parallel().

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/loopclosure · high confidence

Updated vendored x86 instruction decoder to support AVX-512 and modern extensions

The vendored x86 assembler library (golang.org/x/arch/x86/x86asm) has been updated to a newer version, adding comprehensive support for AVX, AVX2, and AVX-512 instruction decoding. This includes new files for handling VEX and EVEX prefixes, generated instruction tables for modern opcodes (such as V4FMADD, VCOMPRESS, and various BF16/PH conversions), and updated syntax formatters for GNU, Intel, and Plan 9 assemblers to correctly display these new instruction variants and their specific attributes like broadcast, zeroing, and rounding control.

src/cmd/vendor/golang.org/x/arch/x86 · high confidence

Vendor golang.org/x/tools/cmd/bisect for internal testing

The internal/godebug package test can now use the bisect command by importing it as a tool dependency in the src/cmd/tools package.

src/cmd/tools · medium confidence

Vendor updated golang.org/x/mod/sumdb with parallel caching and new client/server interfaces

The vendored golang.org/x/mod/sumdb package has been updated, introducing a parallel cache (parCache) that ensures actions are executed only once per key while caching results for concurrent access. The Client now exposes explicit configuration methods, SetTileHeight and SetGONOSUMDB, allowing users to control tile height and exclude specific modules from checksum database lookups. Additionally, the package provides a TestServer implementation to facilitate testing of checksum database interactions.

src/cmd/vendor/golang.org/x/mod/sumdb · high confidence

Vendor updated golang.org/x/sys/unix with Plan 9 support and license files

The vendored golang.org/x/sys/unix package has been updated to include the Plan 9 system call interface (under the plan9 subdirectory) and associated license and patent files. This brings the standard library's vendored dependencies in line with upstream changes, ensuring that Go programs running on Plan 9 have access to the necessary low-level system call definitions and assembly stubs.

src/cmd/vendor/golang.org/x/sys/unix · high confidence

Vendor updated semver package with new sorting and canonicalization logic

The vendored golang.org/x/mod/semver package has been updated to v0.4.0, introducing a new Sort function that orders semantic version strings using Compare with a string fallback, and a Canonical function that normalizes versions by filling in missing minor/patch parts and discarding build metadata. This change affects how the Go toolchain parses and compares version strings, ensuring consistent ordering and formatting for pseudo-versions and standard semver strings.

src/cmd/vendor/golang.org/x/mod/semver · high confidence

Vendor updated telemetry library with new configuration and sidecar startup logic

The vendored golang.org/x/telemetry library has been updated to include a new internal configuration system that loads and validates telemetry upload settings from a JSON file, and a new startup mechanism that re-executes the Go toolchain as a background sidecar process to handle crash reporting and data uploads. This change introduces support for managing telemetry modes (on, local, off) and downloading configuration updates via the Go module system, while adding platform-specific daemonization logic for Windows and POSIX systems.

src/cmd/vendor/golang.org/x/telemetry · high confidence

Vendored errgroup now supports context cancellation with cause and goroutine limits

The vendored copy of golang.org/x/sync/errgroup has been updated to a version that introduces the TryGo method for non-blocking goroutine submission and the SetLimit method to cap the number of active goroutines. Additionally, the Group now uses context.WithCancelCause, allowing errors returned by goroutines to be propagated as cancellation causes, improving debugging and error handling for users relying on this package.

src/cmd/vendor/golang.org/x/sync/errgroup · high confidence

Vet check for struct field tags updated to latest golang.org/x/tools version

The vendored structtag analyzer in the Go vet tool has been updated to the latest version of golang.org/x/tools. This update refreshes the underlying implementation of the structtag check, ensuring that the tool continues to validate struct field tags (such as json and xml) for correctness, duplicate keys, and compatibility with reflect.StructTag.Get according to the most recent upstream standards.

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/structtag · high confidence

Vet gains built-in standard library symbol and dependency graph data

The vendored golang.org/x/tools package now includes a new stdlib package that embeds a comprehensive table of all exported symbols in the Go standard library (including their types, versions, and signatures) and a pre-computed import dependency graph. This data, generated from the Go source tree, allows vet and related tools to perform more accurate static analysis of standard library usage without needing to inspect the actual Go installation at runtime.

src/cmd/vendor/golang.org/x/tools/internal/stdlib · high confidence

Wasm runtime files moved to lib/wasm

The Go WASM runtime support files (including go\_js\_wasm\_exec, go\_wasip1\_wasm\_exec, wasm\_exec.js, and wasm\_exec\_node.js) have been relocated from misc/wasm to lib/wasm. This change reorganizes the repository structure to centralize WASM execution utilities in a dedicated library directory, making them easier to locate and maintain as core library components rather than miscellaneous tools.

lib/wasm · high confidence

addr2line command reimplemented in Go

The addr2line command, previously a C-based tool, has been rewritten in Go to support pprof. This new implementation reads hexadecimal addresses (with optional 0x prefix) from standard input and outputs the corresponding function name and source file:line. It leverages the new cmd/internal/objfile package for object file reading and includes telemetry counters for invocations and flags. The change also introduces comprehensive tests that verify the tool's ability to resolve addresses in test binaries built with debug symbols.

src/cmd/addr2line, src/cmd/pack · high confidence

archive/zip: security hardening, Zip64 fixes, and fs.FS integration

The archive/zip package now rejects insecure file paths (e.g., those with backslashes or outside the current directory) by default, returning ErrInsecurePath; this check can be disabled via the GODEBUG=zipinsecurepath=0 environment variable. Reader and Writer now correctly handle ZIP64 archives, fixing edge cases around large file sizes and offsets. The Reader implements the fs.FS interface, allowing it to be used with standard library functions like io/fs.ReadDir. Additionally, the package introduces per-file compressor/decompressor registration, supports setting a base offset for appending ZIP data to existing files, and adds an AddFS method to the Writer for easily archiving directory trees.

src/archive/zip · high confidence

cgo tool rewritten in Go with new AST-based processing and parallel debug loading

The cgo tool has been completely rewritten in Go, replacing the previous implementation. This change introduces a new architecture where the tool parses Go source files using the standard go/ast package to extract C references, exported functions, and preamble comments, rather than relying on text-based parsing. The tool now processes debug information (DWARF) from the C compiler in parallel to annotate C types, improving robustness and performance. Key behavioral changes include stricter validation of C references, support for new directives like \#cgo nocallback and noescape, and the generation of Go source files that are then compiled by the standard Go compiler, unifying the output pipeline for both gc and gccgo backends.

src/cmd/cgo · high confidence

expvar: rewrite Map internals and add Value methods for better performance and JSON safety

The expvar package has been refactored to replace RWMutex-based synchronization with sync.Map and atomic operations, significantly reducing overhead for Map Set and Add calls. The Map type now includes an Init method to clear existing keys and a Delete method to remove specific keys, while Get returns nil for non-existent variables. Additionally, Int, Float, and String types now expose a Value method to retrieve the underlying data type directly, and all String outputs are guaranteed to be valid JSON (e.g., strings are properly quoted and escaped).

src/expvar · high confidence

go bug command now uses a GitHub issue template

The 'go bug' command has been refactored to generate a bug report body that matches the GitHub issue template. It now opens the default browser to a pre-filled GitHub issue URL, and if the browser cannot be opened, it prints the formatted template text to the console for manual filing. The command also supports the -v flag to print warnings if gathering system information fails.

src/cmd/go/internal/bug · high confidence

nm command reimplemented in Go with new sorting and display options

The nm command has been rewritten in Go, replacing the previous implementation. This change introduces new command-line flags: -size to print symbol sizes in decimal, -type to print symbol types after names, and -sort to control output ordering by address, name, none, or size (with size sorting from largest to smallest). The -n flag is now an alias for -sort address. The command also now supports reading Go archives and handles cgo archives, with improved test coverage for various object file formats and platforms.

src/cmd/nm · high confidence

strconv package refactored with new quoting functions and performance optimizations

The strconv package has been restructured to improve performance and usability. The core logic has been moved to an internal package, with the public API now acting as a thin wrapper that provides better error context. New functions QuoteToGraphic and AppendQuoteToGraphic have been added, allowing strings to be quoted while preserving Unicode graphic characters (like emojis) instead of escaping them. The package also introduces QuotedPrefix for extracting the quoted portion of a string. Performance has been improved through pre-allocation in append operations, the use of internal byte-algorithm optimizations for string searches, and the generation of efficient lookup tables for character classification (IsPrint, IsGraphic) based on the latest Unicode standards. Additionally, the package now supports parsing and formatting complex numbers via ParseComplex and FormatComplex.

src/strconv · high confidence

Fixes

1 commit (1 fix) fixing src/archive/zip/testdata/zip64

A fix in src/archive/zip/testdata/zip64 — 1 commit (1 fix), 24 files.

src/archive/zip/testdata/zip64 · medium confidence · unverified

Fix DWARF line table for last instruction in linked binaries

This change corrects how the linker generates DWARF line information, specifically ensuring that the file and line number for the last instruction in a function are recorded accurately. This improves the precision of stack traces and debugging information for Go binaries, resolving issues where debuggers might report incorrect source locations for the final instruction of a function.

src/cmd/link/internal/ld/testdata/issue39757 · medium confidence

Fix linker hash collision check for static temps with same contents but different sizes

The linker now correctly handles cases where two static temporary symbols have identical contents but different sizes, ensuring no false hash collision is reported. This test case verifies that the linker can deduplicate such symbols (keeping the larger one) and that the emitted symbol contents remain correct.

src/cmd/link/testdata/testHashedSyms · high confidence

Fix panic on exported basic type aliases

The API documentation tool no longer crashes when encountering exported basic type aliases (such as \type BasicAlias = uint8\). This change ensures that tools processing Go source code can handle these alias definitions without panicking, improving stability for users documenting packages that export such types.

src/cmd/api/testdata/src/issue64958 · high confidence

Test coverage

Add Fortran integration tests to cgo; Add c-shared library integration tests; Add example code and tests for path and filepath packages; Add regression test for DWARF loclist generation with heap return variables; Add test data for coverage tooling; Add test data for p3 package API signatures; Added AVX-512 end-to-end assembly encoding tests; Added PGO inlining test data for hot-path profiling; Added SWIG integration tests for C++ callbacks and C stdio wrapping; Added cgo stdio test suite with pthread coordination examples; Added compiler test generators for arithmetic, comparison, and memory operations; Added compiler test suite for SSA code generation; Added compiler test suite for generated code verification; Added local module proxy test fixtures for Go module system; Added long-running test for module zip sum stability; Added manual debugging test file; Added regression test for HTML coverage output sorting; Added regression test for issue \#42484; Added script-based tests for Go fuzzing behavior; Added stack check test cases for nosplit and recursion scenarios; Added test case for DWARF line table generation; Added test case for Darwin/DWARF and macOS 10.14 compatibility; Added test case for duplicate undefined relocation errors; Added test case for issue 79145; Added test cases for PE resource section handling; Added test coverage for cgo -godefs type translation edge cases; Added test data fixtures for archive parsing; Added test data for ZIP files without data descriptor signatures; Added test data for issue 21181 to verify API analysis with build tags; Added test data for the Go coverage tool; Added test data modules for linker DWARF and test scenarios; Added test fixtures for API surface analysis; Added test fixtures for Android, Illumos, and wildcard tag handling; Added test fixtures for shared library initialization and linking edge cases; Added tests analyzer to detect common mistakes in Go test functions; Added tests for API release note validation; Added tests for CGO export alignment and doc comment sanitization; Added tests for CGO sanitizers (ASAN, MSAN, TSAN, LSAN, LibFuzzer); Added tests for CGO shared object and variable access; Added tests for CGO thread-local storage support; Added tests for Go toolchain bootstrapping and FIPS 140-3 support; Added tests for PGO-driven call devirtualization; Added tests for cgo error detection and pointer safety; Added tests for cgo stdio integration; Added tests for long-running and network-dependent Go tool behaviors; Added tests for shared library build mode; Added tests for the API checking tool; Added tests for the testdir runner; Added tests to verify GOROOT module dependency consistency; End-to-end assembly encoding tests for 386 and AMD64; Expanded c-archive test coverage for signal handling and stack safety; Expanded cgo error-checking test suite; Expanded cgo test suite for callbacks, threading, and platform-specific behaviors; Expanded compiler and runtime test coverage; Expanded plugin integration test coverage; Expanded sanitizer test coverage for Go runtime and cgo integration; Expanded syntax error test coverage for Go generics and parser improvements; Migration of go command tests to the script framework; New DWARF test helper package for easier debugging; New linker test suite and documentation; New local test server for VCS integration tests; New test data for inlining heuristic function properties and call-site scoring; New test package infrastructure for go test; Updated SSA debug test reference files for GDB and Delve; Updated objdump test fixtures for line-number handling and file enumeration; Vet test suite expanded with new analyzer test cases; gofmt test suite expanded with new formatting and simplification cases; test2json test artifacts added.

Dependencies

Added directory hashing support for Go module checksums

The Go toolchain now includes the \dirhash\ package in its vendored standard library dependencies, enabling the calculation of directory tree hashes (specifically the \h1:\ format) for verifying module content integrity. This addition supports the Go checksum database by allowing the tool to hash local directories and zip archives, ensuring that downloaded modules match their expected content hashes recorded in \go.sum\ files.

src/cmd/vendor/golang.org/x/mod/sumdb/dirhash · high confidence

Standard library and command modules are split into independent submodules

The Go standard library (\src/go.mod\) and the Go toolchain (\src/cmd/go.mod\) are now managed as separate Go modules, each with their own \go.mod\ and \go.sum\ files. This change decouples the dependency management of the standard library from the compiler and tools, allowing them to be versioned and updated independently. Additionally, numerous internal build and test subdirectories (such as \crypto/internal/fips140/\*/\_asm\, \cmd/compile/internal/ssa/\_gen\, and \misc\) are now also independent modules, enabling localized dependency updates for code generation tools and test fixtures.

(dependencies) · high confidence

Update vendored golang.org/x/mod to v0.2.0

The vendored copy of golang.org/x/mod in the Go toolchain has been updated to version 0.2.0. This update includes the note package implementation for verifying and signing notes used by the Go module database server, ensuring the toolchain uses the latest cryptographic verification logic for module proxy interactions.

src/cmd/vendor/golang.org/x/mod/sumdb/note · high confidence

Updated vendored golang.org/x/tools typeutil package

The vendored golang.org/x/tools package in src/cmd/vendor/golang.org/x/tools/go/types/typeutil has been updated to a newer revision. This update introduces new utility functions for Go type analysis, including Callee and StaticCallee for identifying function call targets, Dependencies for retrieving package import graphs, and IntuitiveMethodSet for displaying method sets that align with user expectations in UIs. It also includes a thread-safe MethodSetCache for performance optimization and a Map type for hashing Go types.

(repo-wide) · high confidence

Updated vendored markdown parser

The vendored copy of the rsc.io/markdown package has been updated. This change refreshes the CommonMark-compliant Markdown parser and HTML generator used internally, incorporating new source files for features such as emoji support, HTML entity handling, and improved parsing for code blocks, headings, and lists.

src/cmd/vendor/rsc.io · high confidence

Housekeeping

Added license and patent files for vendored sync package

The vendored golang.org/x/sync package now includes its LICENSE and PATENTS files, ensuring proper attribution and legal compliance for the included synchronization primitives.

src/cmd/vendor/golang.org/x/sync · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 44.

Lenses

  • Code Health 67
  • Architecture 98
  • Maturity 61
  • Readiness 35
  • Security 68
  • Accessibility 36

Changes since last survey

  • 300 commits — 275 feature/other, 25 fixes

By area

  • src/cmd — 132 commits
  • src/net — 40 commits
  • src/simd — 27 commits
  • src/runtime — 24 commits
  • src/crypto — 14 commits
  • src/debug — 10 commits
  • src/internal — 10 commits
  • src/math — 9 commits
  • test/fixedbugs — 6 commits
  • src/compress — 2 commits
  • src/encoding — 2 commits
  • src/go — 2 commits
  • src/hash — 2 commits
  • src/log — 2 commits
  • src/os — 2 commits
  • src/testing — 2 commits
  • src/time — 2 commits
  • src/vendor — 2 commits
  • doc/go_spec.html — 1 commit
  • doc/godebug.md — 1 commit

Notable commits

  • fix: Revert "cmd/cgo: emit any instead of interface{} in generated files"
  • fix: Revert "cmd/compile: support unified V5 export data (method indices)"
  • fix: cmd/compile: fix ICE with for range clause in midway pass
  • fix: cmd/compile: fix large riscv64 move/zero
  • fix: cmd/dist: fix GOFIPS140 toolchain compilation
  • fix: cmd/dist: revert "update Linux builder detection for LUCI"
  • fix: cmd/go: fix discrepancy in godebug_decoratemappings_comment test
  • fix: cmd/go: fix tool_build_as_needed for cross-built testgo
  • fix: cmd/internal/obj/loong64: fix the 'param' register of the [X]VMOVQ when its operand is C_SAUTO
  • fix: cmd/internal/obj/loong64: fix vector arrangement encoding error
  • fix: crypto/internal/fips140/bigmod: fix and exercise impl integration
  • fix: encoding/json: fix Printf format in TestNullString
  • fix: internal/poll: fix close race for event-backed Windows pipes
  • fix: math/big: fix DivMod when the modulus aliases the divisor
  • fix: math/big: fix Float.Uint64 accuracy for fractional values
  • fix: net/http: fix HTTP/1 deadlock on concurrent response body Read and Close
  • fix: net/http: fix flaky TestTimeoutHandlerSuperfluousLogs
  • fix: net/http: fix two bugs from CL 828504
  • fix: runtime: fix randomized heap base prefix mask misalignment
  • fix: simd/internal/spec: fix ConvertToZ width rounding
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

golang/go was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 24 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6b3800e1dd90925b4184acd6391f68bffd16b6a5 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-5f8d0eb43fd7.