Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Print ¶
func Print(g *graph.HierarchicalDigraph, config *PrintConfig) error
Print takes in a PrintConfig struct and dumps the content of a HierarchicalDigraph instance according to parameters.
Types ¶
type ClusterLevel ¶
type ClusterLevel int
Level at which to performing clustering when generating the image of the dependency graph.
const ( // No clustering. Each node is printed as is. Off ClusterLevel = iota // Cluster nodes that have the same parent. Parent Shared // Cluster nodes that all have the same (group of) predecessor(s) in the graph. Full )
type PrintConfig ¶
type PrintConfig struct { // Logger that should be used to show progress while printing the Graph. Log *logger.Logger // Which level of granularity to print the graph at (modules, packages). Granularity Level // Annotate edges and nodes with their respective versions. Annotate bool // Path at which the printed version of the Graph should be stored. If set to a nil-string a // temporary file will be created. OutputPath string // Options for generating a visual representation of the Graph. If the field is non-nil, print // out an image file using GraphViz, if false print out the graph in DOT format. Style *StyleOptions }
PrintConfig allows for the specification of parameters that should be passed to the Print function of a Graph.
type StyleOptions ¶
type StyleOptions struct { // Scale nodes according to the number of their successors and predecssors. ScaleNodes bool // Level at which to cluster nodes in the printed graph. This can be very beneficial for larger // dependency graphs that might be unreadable with the default settings. Cluster ClusterLevel }
Click to show internal directories.
Click to hide internal directories.