18 lines
265 B
Go
18 lines
265 B
Go
package graphviz
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
)
|
|
|
|
// Node represents a graphviz node.
|
|
type Node struct {
|
|
*Attributes
|
|
name string
|
|
}
|
|
|
|
func (n Node) render(w io.Writer, indent string) error {
|
|
_, err := fmt.Fprintf(w, "%s%q%s;\n", indent, n.name, n.String())
|
|
return err
|
|
}
|