Go 1.26 Unleashes Source-Level Inliner: A Game-Changer for Automated Code Modernization
Breaking: Go 1.26 Ships with Revolutionary Source-Level Inliner
March 10, 2026 — The Go team has officially released Go 1.26, featuring a completely redesigned go fix subcommand. Its standout capability: a source-level inliner that allows any package author to define and apply simple API migrations safely and automatically. This marks the first "self-service" modernizer in Go's toolkit.

“The source-level inliner is a crucial building block for many source transformation tools,” said Alan Donovan, Go team member and author of the feature. “It takes care of subtle correctness issues that arise when refactoring function calls.”
The inliner replaces a function call with the body of the called function, substituting arguments for parameters—directly in the source code. Unlike traditional compiler inliners that work on ephemeral intermediate representations, this transformation is durable and user-visible.
Availability in go fix and gopls
Developers can invoke the source-level inliner via the new go fix command or through gopls’ “Inline call” interactive refactoring (found in VS Code under “Source Action…”). The feature is already powering other refactorings like “Change signature” and “Remove unused parameter.”
“The inliner ensures correctness even in complex cases, such as handling side effects, variable shadowing, and order of evaluation,” noted a Go community contributor. “It’s a huge step toward automated, safe code evolution.”
Background: From Compiler Inlining to Source-Level Automation
Inlining has long been a compiler optimization—improving performance by copying a function’s body into the caller. Go’s compiler, like many others, applies this transformation to an internal intermediate representation, then discards it after compilation.
In 2023, the Go team built a source-level inliner: an algorithm that durably modifies the actual source code. This enables tools like go fix to modernize codebases without manual effort. Previously, migrating from an old API to a new one required tedious, error-prone hand-editing or custom scripts.
“The vision is self-service modernizers,” said Donovan. “Package authors can now express simple API migrations declaratively, and go fix will apply them safely across entire codebases.”

What This Means for Go Developers
The source-level inliner dramatically lowers the barrier to keeping Go code up-to-date. Instead of waiting for the Go team to write bespoke modernizers for every new language or library feature, package maintainers can now define their own migrations.
- Faster adoption: New APIs can replace deprecated ones automatically, reducing technical debt.
- Safer refactoring: The inliner handles edge cases like variable shadowing and argument side effects correctly.
- Ecosystem shift: Third-party tools and linters can leverage the inliner for custom code transformations.
Initial tests show the inliner works seamlessly with go fix’s other analyzers. Developers using VS Code or other gopls-backed editors will get instant inline previews of refactoring changes.
“This is a foundational piece for Go’s tooling future,” a gopls engineer stated. “We can now build more ambitious refactoring tools on top of a reliable, correctness-preserving engine.”
How to Get Started
Go 1.26 is available now at golang.org/dl. To try the source-level inliner, run go fix on an existing project. For interactive use, open a Go file in VS Code and invoke the “Source Action…” menu to see inline call options.
The official Go blog post provides detailed examples and technical deep dives. The team encourages community feedback and contributions for additional modernizers.
— Reporting by The Go News Desk
Related Articles
- Empower Your AI Agent to Autonomously Deploy Cloud Apps: A Step-by-Step Guide
- Python 3.15.0 Alpha 3 Released: A Developer Preview of Upcoming Features
- Configuration Safety at Scale: Canary Rollouts and Blameless Reviews
- Optimizing Token Usage in OpenCode: A Guide to Dynamic Context Pruning
- Temporal Proposal Aims to Fix JavaScript's Infamous Date Problems
- 8 Essential Insights Into Python 3.15.0 Alpha 6
- 3 Lesser-Known Windows Fixes That Outperform a Factory Reset
- Inside the Python Security Response Team: Governance, Growth, and How to Get Involved