Help us shape the future of Go! Take the 2026 Go Developer Survey

fixinline

command
v0.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Command fixinline checks that go fix inlines every //go:fix inline wrapper of the repository correctly:

go run ./internal/tools/fixinline [-v]

An inliner argument swap was reported when a parameter name matches a caller's argument name: i18n.NewMiddleware(b, MiddlewareConfig{}) became Middleware(MiddlewareConfig{}, cfg) while the wrapper's parameters were named b and cfg (v0.26.0, decision B2; not reproduced on Go 1.27.2). For each wrapper the command adds a generated file to the wrapper's package through a go build overlay (the working tree is never written), with callers whose argument variables reuse the parameter names: in order, rotated by one, and with one argument replaced by an expression while the same-named variable is in scope. It runs go fix -diff on those packages and fails unless every generated call becomes exactly the wrapper's body with the arguments substituted.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL