(isTarget bool)
| 147 | } |
| 148 | |
| 149 | func (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 | |
| 160 | func (n Node) ToMap() (map[string]interface{}, error) { |
| 161 | var m map[string]interface{} |
no test coverage detected