Documentation ¶
Overview ¶
Package engine is the programmatic entrypoint to the Go refactoring engine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDefaultRefactorings ¶
func AddDefaultRefactorings()
AddDefaultRefactorings invokes AddRefactoring on each of the Go Doctor's built-in refactorings.
Clients implementing a custom Go Doctor may: 1. not invoke this at all, 2. invoke it after adding custom refactorings, or 3. invoke it before adding custom refactorings. The choice between #2 and #3 will determine whether the client's custom refactorings are listed before or after the built-in refactorings when "godoctor -list" is run.
func AddRefactoring ¶
func AddRefactoring(shortName string, newRefac refactoring.Refactoring) error
AddRefactoring allows custom refactorings to be added to the refactoring engine. Invoke this method before starting the command line or protocol driver.
func AllRefactoringNames ¶
func AllRefactoringNames() []string
AllRefactoringNames returns the short names of all refactorings in an order suitable for display in a menu.
func ClearRefactorings ¶
func ClearRefactorings()
ClearRefactorings removes all registered refactorings from the engine. This should only be used for testing.
func GetRefactoring ¶
func GetRefactoring(shortName string) refactoring.Refactoring
GetRefactoring returns a Refactoring keyed by the given short name. The short name must be one of the keys in the map returned by AllRefactorings.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
The cli package provides a command-line interface for the Go Doctor.
|
The cli package provides a command-line interface for the Go Doctor. |
Package protocol provides an implementation of the OpenRefactory protocol (server-side), which provides a standard mechanism for text editors to communicate with refactoring engines.
|
Package protocol provides an implementation of the OpenRefactory protocol (server-side), which provides a standard mechanism for text editors to communicate with refactoring engines. |