Documentation ¶
Overview ¶
Package edit contains helpers for creating suggested fixes.
Index ¶
- func Delete(old Ranger) analysis.TextEdit
- func Fix(msg string, edits ...analysis.TextEdit) analysis.SuggestedFix
- func ReplaceWithNode(fset *token.FileSet, old Ranger, new ast.Node) analysis.TextEdit
- func ReplaceWithPattern(fset *token.FileSet, old Ranger, new pattern.Pattern, state pattern.State) analysis.TextEdit
- func ReplaceWithString(old Ranger, new string) analysis.TextEdit
- func Selector(x, sel string) *ast.SelectorExpr
- type Range
- type Ranger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceWithNode ¶
ReplaceWithNode replaces a range with an AST node.
func ReplaceWithPattern ¶
func ReplaceWithPattern(fset *token.FileSet, old Ranger, new pattern.Pattern, state pattern.State) analysis.TextEdit
ReplaceWithPattern replaces a range with the result of executing a pattern.
func ReplaceWithString ¶
ReplaceWithString replaces a range with a string.
func Selector ¶
func Selector(x, sel string) *ast.SelectorExpr
Selector creates a new selector expression.
Types ¶
Click to show internal directories.
Click to hide internal directories.