Documentation
¶
Overview ¶
Package analyzer provides functionality for analyzing Go package dependencies.
Index ¶
- type Analyzer
- func (a *Analyzer) AnalyzeFromFile(entryFile string, excludeExternal bool, excludeDirs []string) (*DependencyGraph, error)
- func (a *Analyzer) AnalyzeMultipleEntryPoints(repoRoot string, excludeExternal bool, excludeDirs []string) (*MultiEntryAnalysisResult, error)
- func (a *Analyzer) FindEntryPoints(repoRoot string) ([]string, error)
- type DependencyGraph
- type EntryPoint
- type MultiEntryAnalysisResult
- type PackageInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer analyzes Go package dependencies.
func (*Analyzer) AnalyzeFromFile ¶
func (a *Analyzer) AnalyzeFromFile( entryFile string, excludeExternal bool, excludeDirs []string, ) (*DependencyGraph, error)
AnalyzeFromFile analyzes package dependencies starting from a Go file.
func (*Analyzer) AnalyzeMultipleEntryPoints ¶
func (a *Analyzer) AnalyzeMultipleEntryPoints( repoRoot string, excludeExternal bool, excludeDirs []string, ) (*MultiEntryAnalysisResult, error)
AnalyzeMultipleEntryPoints finds and analyzes all entry points in a repository.
type DependencyGraph ¶
type DependencyGraph struct {
EntryPackage string
Packages map[string]*PackageInfo
Layers [][]string // Packages organized by layer
ModuleName string // Name of the Go module
}
DependencyGraph represents the package dependency graph.
type EntryPoint ¶
type EntryPoint struct {
Path string `json:"path"` // Absolute file path
RelativePath string `json:"relativePath"` // Relative path from repository root
PackagePath string `json:"packagePath"` // Go package path
DOTContent string `json:"dotContent"` // Generated DOT visualization
Graph *DependencyGraph `json:"-"` // Internal graph data (not serialized)
}
EntryPoint represents a detected entry point in the codebase.
type MultiEntryAnalysisResult ¶
type MultiEntryAnalysisResult struct {
Success bool `json:"success"`
EntryPoints []EntryPoint `json:"entryPoints,omitempty"`
Error string `json:"error,omitempty"`
RepoRoot string `json:"repoRoot"`
ModuleName string `json:"moduleName"`
}
MultiEntryAnalysisResult represents the result of analyzing multiple entry points.
Click to show internal directories.
Click to hide internal directories.