package gofixdirective
import "golang.org/x/tools/go/analysis/passes/internal/gofixdirective"
Package gofixdirective searches for and validates go:fix directives. The go/analysis/passes/inline package uses findgofix to perform inlining. The go/analysis/passes/gofix package uses findgofix to check for problems with go:fix directives.
gofixdirective is separate from gofix to avoid depending on refactor/inline, which is large.
Index ¶
Functions ¶
func Find ¶
Find finds functions and constants annotated with an appropriate "//go:fix" comment (the syntax proposed by #32816), and calls handler methods for each one. h may be nil.
Types ¶
type Handler ¶
type Handler interface {
HandleFunc(*ast.FuncDecl)
HandleAlias(*ast.TypeSpec)
HandleConst(name, rhs *ast.Ident)
}
A Handler handles language entities with go:fix directives.
Source Files ¶
gofixdirective.go
- Version
- v0.44.0 (latest)
- Published
- Apr 9, 2026
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 1 hour ago –
Tools for package owners.