Parses the Graphviz DOT language in golang
Clone or download
Permalink
Failed to load latest commit information.
ast Fix index out of range error (#37) Jan 31, 2018
internal regenerate with newest gocc Jun 7, 2018
testdata fix dead links Aug 13, 2018
.travis.yml upgrade go version Apr 10, 2017
AUTHORS updated travis to regenerate and check diff Oct 1, 2016
CONTRIBUTORS Allow nodes and edges to be removed (#44) Sep 27, 2018
LICENSE copyright adjustment Aug 10, 2016
Makefile ignore fmt.Fprintf errors Jun 7, 2018
Readme.md Update Readme.md (#43) Sep 11, 2018
analyse.go Test for issue #32 (#33) Jun 10, 2017
analysewrite_test.go Attributes and Errors (#25) Apr 10, 2017
attr.go fix dead links Aug 13, 2018
attrs.go Attributes and Errors (#25) Apr 10, 2017
bug_test.go Attributes and Errors (#25) Apr 10, 2017
catch.go Attributes and Errors (#25) Apr 10, 2017
dot.bnf fix dead links Aug 13, 2018
edges.go Attributes and Errors (#25) Apr 10, 2017
edges_test.go Attributes and Errors (#25) Apr 10, 2017
escape.go Escape names containing a slash (#41) Jul 4, 2018
escape_test.go Escape names containing a slash (#41) Jul 4, 2018
example_test.go Attributes and Errors (#25) Apr 10, 2017
gographviz.go Attributes and Errors (#25) Apr 10, 2017
graph.go Allow subgraphs to be removed including nodes (#45) Oct 13, 2018
install-godeps.sh update golint installation Oct 13, 2018
issue21_test.go Attributes and Errors (#25) Apr 10, 2017
issue26_test.go fix for issue 26 May 28, 2017
issue32_test.go Test for issue #32 (#33) Jun 10, 2017
nodes.go Allow nodes and edges to be removed (#44) Sep 27, 2018
relations.go Allow nodes and edges to be removed (#44) Sep 27, 2018
remove_test.go Allow subgraphs to be removed including nodes (#45) Oct 13, 2018
subgraphs.go Allow subgraphs to be removed including nodes (#45) Oct 13, 2018
write.go Attributes and Errors (#25) Apr 10, 2017

Readme.md

Parses the Graphviz DOT language and creates an interface, in golang, with which to easily create new and manipulate existing graphs which can be written back to the DOT format.

This parser has been created using gocc.

Example (Parse and Edit)

graphAst, _ := gographviz.ParseString(`digraph G {}`)
graph := gographviz.NewGraph()
if err := gographviz.Analyse(graphAst, graph); err != nil {
    panic(err)
}
graph.AddNode("G", "a", nil)
graph.AddNode("G", "b", nil)
graph.AddEdge("a", "b", true, nil)
output := graph.String()

Documentation

The godoc includes some more examples.

Installation

go get github.com/awalterschulze/gographviz

Tests

Build Status

Users

  • aptly - Debian repository management tool
  • gorgonia - A Library that helps facilitate machine learning in Go
  • imagemonkey - Let's create our own image dataset
  • depviz - GitHub dependency visualizer (auto-roadmap)

Mentions

Using Golang and GraphViz to Visualize Complex Grails Applications