<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/go-fix-inline-and-the-source-level-inliner-6v7tdcatp" -->

---
title: //go:fix inline and the source-level inliner | daily.dev
description: Go 1.26 introduces a source-level inliner as part of the redesigned `go fix` command, enabling self-service API migrations. By annotating deprecated functions...
canonical: https://daily.dev/posts/go-fix-inline-and-the-source-level-inliner-6v7tdcatp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: //go:fix inline and the source-level inliner | daily.dev
og:description: Go 1.26 introduces a source-level inliner as part of the redesigned `go fix` command, enabling self-service API migrations. By annotating deprecated functions...
og:url: https://daily.dev/posts/go-fix-inline-and-the-source-level-inliner-6v7tdcatp
og:image: https://api.daily.dev/og/posts/6v7TDCAtP.png
og:image:alt: //go:fix inline and the source-level inliner
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# //go:fix inline and the source-level inliner

**[Go](https://daily.dev/sources/golang)** · 16 min read · 14 upvotes · 0 comments

## Summary

Go 1.26 introduces a source-level inliner as part of the redesigned `go fix` command, enabling self-service API migrations. By annotating deprecated functions with `//go:fix inline`, package authors can instruct the tool to automatically replace calls to old functions with their new equivalents. The post explains how the inliner works and covers six key technical challenges it must handle correctly: parameter elimination, side effects and evaluation order, fallible constant expressions, variable shadowing, unused variables, and defer statements. The inliner is already integrated into gopls for interactive use and has been used to prepare over 18,000 changelists in Google's monorepo.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://go.dev/blog/inliner>

## Similar posts on daily.dev

- [Using go fix to modernize Go code](https://daily.dev/posts/using-go-fix-to-modernize-go-code-minrxyefk) · Go · 145 upvotes · 3 comments
- [Automating Technical Debt: Code-Level Migrations with 'go fix' 1.30](https://daily.dev/posts/automating-technical-debt-code-level-migrations-with-go-fix-1-30-cjhfkvaoo) · SitePoint · 0 upvotes · 0 comments
- [Go feature: Modernized go fix](https://daily.dev/posts/go-feature-modernized-go-fix-09pkq2pbr) · Anton Zhiyanov · 47 upvotes · 0 comments
- [Go 1.26 Quietly Fixed the Things That Were Actually Annoying](https://daily.dev/posts/go-1-26-quietly-fixed-the-things-that-were-actually-annoying-eei6x0bgf) · Towards Dev · 105 upvotes · 0 comments
- [Dust Off Your Toolchain: Why go fix is the Secret Star of Go 1.26](https://daily.dev/posts/dust-off-your-toolchain-why-go-fix-is-the-secret-star-of-go-1-26-daxedo5kx) · Medium · 2 upvotes · 0 comments

---

Tags: [#golang](https://daily.dev/tags/golang)

[View this post on daily.dev](https://daily.dev/posts/go-fix-inline-and-the-source-level-inliner-6v7tdcatp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"//go:fix inline and the source-level inliner","url":"https://daily.dev/posts/go-fix-inline-and-the-source-level-inliner-6v7tdcatp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/go-fix-inline-and-the-source-level-inliner-6v7tdcatp"},"datePublished":"2026-03-11T17:00:59.924Z","dateModified":"2026-03-11T17:01:21.673Z","description":"Go 1.26 introduces a source-level inliner as part of the redesigned `go fix` command, enabling self-service API migrations. By annotating deprecated functions...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/39b837b91d435ac673a1daa7b32a05fa?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/39b837b91d435ac673a1daa7b32a05fa?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Go","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Go","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/f416aeab0a1f4b9faa22d93768c97905","url":"https://daily.dev/sources/golang"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/go-fix-inline-and-the-source-level-inliner-6v7tdcatp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":14},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"golang","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Go","item":"https://daily.dev/sources/golang"},{"@type":"ListItem","position":3,"name":"//go:fix inline and the source-level inliner"}]}
```

