toolshonnef.co/go/tools/edit Index | Files

package edit

import "honnef.co/go/tools/edit"

Index

Functions

func Delete

func Delete(old Ranger) analysis.TextEdit

func Fix

func Fix(msg string, edits ...analysis.TextEdit) analysis.SuggestedFix

func ReplaceWithNode

func ReplaceWithNode(fset *token.FileSet, old Ranger, new ast.Node) analysis.TextEdit

func ReplaceWithPattern

func ReplaceWithPattern(pass *analysis.Pass, after pattern.Pattern, state pattern.State, node Ranger) analysis.TextEdit

func ReplaceWithString

func ReplaceWithString(fset *token.FileSet, old Ranger, new string) analysis.TextEdit

Types

type Range

type Range [2]token.Pos

func (Range) End

func (r Range) End() token.Pos

func (Range) Pos

func (r Range) Pos() token.Pos

type Ranger

type Ranger interface {
	Pos() token.Pos
	End() token.Pos
}

Source Files

edit.go

Version
v0.0.1-2020.1.2
Published
Feb 21, 2020
Platform
windows/amd64
Imports
6 packages
Last checked
6 minutes ago

Tools for package owners.