Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadGoModFile ¶
ReadGoModFile reads the go.mod file at the project root to find the module name. Returns the module name or an empty string if not found or error occurred.
Types ¶
type JSResolver ¶
type JSResolver struct{}
JSResolver implements Resolver for TypeScript/JavaScript files.
type Resolver ¶
type Resolver interface {
// Resolve finds direct, project-local dependencies for the given file path.
// fileContent is the content of the file to parse.
// filePath is the path relative to the project root.
// projectRoot is the absolute path to the project root.
// projectModuleName is the go module name (if applicable, empty otherwise).
// Returns a slice of dependency paths, also relative to the project root.
Resolve(fileContent []byte, filePath string, projectRoot string, projectModuleName string) ([]string, error)
}
Resolver defines the interface for finding direct dependencies of a file.
func GetResolver ¶
GetResolver returns the appropriate resolver based on the file extension.
Click to show internal directories.
Click to hide internal directories.