Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderMermaid ¶
func RenderMermaid(graph *DependencyGraph) string
RenderMermaid converts the dependency graph into a Mermaid flowchart format.
Types ¶
type DependencyGraph ¶
type DependencyGraph struct {
Nodes []string
Edges map[string][]string // Maps a package to the list of packages it imports
}
DependencyGraph represents the package-level dependency relationships.
func AnalyzeDependencies ¶
func AnalyzeDependencies(ctx context.Context, path string) (*DependencyGraph, error)
AnalyzeDependencies parses the module and builds a graph of internal package dependencies.
type FunctionComplexity ¶
type FunctionComplexity struct {
PkgName string
FuncName string
FileName string
Line int
Complexity int
}
FunctionComplexity represents the cyclomatic complexity of a single Go function.
func AnalyzeComplexity ¶
func AnalyzeComplexity(ctx context.Context, path string) ([]FunctionComplexity, error)
AnalyzeComplexity parses the module at the given path and calculates the cyclomatic complexity (McCabe's) of every function. It returns a slice of FunctionComplexity sorted from highest to lowest.
Click to show internal directories.
Click to hide internal directories.