Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildNodeNames ¶
BuildNodeNames returns stable, distinct display names for file paths. Paths that share the same base name are disambiguated by increasing path suffix depth.
func SupportedFormats ¶
func SupportedFormats() string
SupportedFormats returns a list of all supported output format names.
Types ¶
type Formatter ¶
type Formatter interface {
// Format converts a dependency graph to a formatted string representation.
Format(g depgraph.FileDependencyGraph, opts RenderOptions) (string, error)
// GenerateURL creates a shareable URL for the formatted output.
// Returns the URL and true if supported, or ("", false) if not.
GenerateURL(output string) (string, bool)
}
Formatter is the interface that all graph formatters must implement.
type OutputFormat ¶
type OutputFormat int
OutputFormat represents an output format type
const ( OutputFormatDOT OutputFormat = iota OutputFormatMermaid )
func ParseOutputFormat ¶
func ParseOutputFormat(s string) (OutputFormat, bool)
ParseOutputFormat converts a string to OutputFormat
func (OutputFormat) String ¶
func (f OutputFormat) String() string
String returns the string representation of the format
type RenderOptions ¶
type RenderOptions struct {
// Label is an optional title or label for the graph output.
Label string
}
RenderOptions contains output-specific rendering options.
Click to show internal directories.
Click to hide internal directories.