Documentation
¶
Index ¶
- func DetermineExtractionTarget(sourceFilePath string, funcDecl *ast.FuncDecl) (targetFilePath string, targetFuncName string, targetPackageName string)
- func MoveBatchFiles(moveOps []MoveOp, moduleRoot string, goimportsPath string) error
- func MoveFileWithImportUpdates(sourceFile string, targetFile string, moduleRoot string, goimportsPath string) error
- type MoveOp
- type UnexportedDependency
- type UnexportedRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetermineExtractionTarget ¶
func DetermineExtractionTarget(sourceFilePath string, funcDecl *ast.FuncDecl) ( targetFilePath string, targetFuncName string, targetPackageName string, )
DetermineExtractionTarget determines where we'd like to extract the function to.
func MoveBatchFiles ¶
MoveBatchFiles performs atomic batch file moves with refactoring support. All files are moved together and import updates happen once for all files.
func MoveFileWithImportUpdates ¶
func MoveFileWithImportUpdates(sourceFile string, targetFile string, moduleRoot string, goimportsPath string) error
MoveFileWithImportUpdates performs a refactoring file move from source to target, updating all import statements in the codebase that reference the old package path.
Types ¶
type UnexportedDependency ¶
type UnexportedDependency struct {
Name string // Symbol name
Kind string // "func", "var", "type", "const", "method"
DefiningFile string // File where symbol is defined
}
UnexportedDependency represents an unexported symbol that a file depends on.
type UnexportedRef ¶
type UnexportedRef struct {
SymbolName string
FileName string // File containing the symbol
ReferencedFrom []string // Files referencing it
}
UnexportedRef represents an unexported symbol being referenced from another package
Click to show internal directories.
Click to hide internal directories.