MCPcopy
hub / github.com/bettercap/bettercap / Dot

Method Dot

modules/graph/node.go:149–158  ·  view source on GitHub ↗
(isTarget bool)

Source from the content-addressed store, hash-verified

147}
148
149func (n Node) Dot(isTarget bool) string {
150 style := nodeDotStyles[n.Type]
151 if isTarget {
152 style += ", color=red"
153 }
154 return fmt.Sprintf("\"%s\" [%s, label=\"%s\"];",
155 n.String(),
156 style,
157 strings.ReplaceAll(n.Label(), "\"", "\\\""))
158}
159
160func (n Node) ToMap() (map[string]interface{}, error) {
161 var m map[string]interface{}

Callers 1

generateDotGraphMethod · 0.45

Calls 2

StringMethod · 0.95
LabelMethod · 0.95

Tested by

no test coverage detected