type DotAttributes … type DotNodeAttributes … type DotConfig … const maxNodelets … // ComposeDot creates and writes a in the DOT format to the writer, using // the configurations given. func ComposeDot(w io.Writer, g *Graph, a *DotAttributes, c *DotConfig) { … } type builder … // start generates a title and initial node in DOT format. func (b *builder) start() { … } // finish closes the opening curly bracket in the constructed DOT buffer. func (b *builder) finish() { … } // addLegend generates a legend in DOT format. func (b *builder) addLegend() { … } // addNode generates a graph node in DOT format. func (b *builder) addNode(node *Node, nodeID int, maxFlat float64) { … } // addNodelets generates the DOT boxes for the node tags if they exist. func (b *builder) addNodelets(node *Node, nodeID int) bool { … } func (b *builder) numericNodelets(nts []*Tag, maxNumNodelets int, flatTags bool, source string) string { … } // addEdge generates a graph edge in DOT format. func (b *builder) addEdge(edge *Edge, from, to int, hasNodelets bool) { … } // dotColor returns a color for the given score (between -1.0 and // 1.0), with -1.0 colored green, 0.0 colored grey, and 1.0 colored // red. If isBackground is true, then a light (low-saturation) // color is returned (suitable for use as a background color); // otherwise, a darker color is returned (suitable for use as a // foreground color). func dotColor(score float64, isBackground bool) string { … } func multilinePrintableName(info *NodeInfo) string { … } // collapsedTags trims and sorts a slice of tags. func (b *builder) collapsedTags(ts []*Tag, count int, flatTags bool) []*Tag { … } func tagDistance(t, u *Tag) float64 { … } func (b *builder) tagGroupLabel(g []*Tag) (label string, flat, cum int64) { … } func min64(a, b int64) int64 { … } // escapeAllForDot applies escapeForDot to all strings in the given slice. func escapeAllForDot(in []string) []string { … } // escapeForDot escapes double quotes and backslashes, and replaces Graphviz's // "center" character (\n) with a left-justified character. // See https://graphviz.org/docs/attr-types/escString/ for more info. func escapeForDot(str string) string { … }