Skip to content
Parses the Graphviz DOT language in golang
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ast
internal
testdata
.travis.yml
AUTHORS
CONTRIBUTORS
LICENSE
Makefile
Readme.md
analyse.go
analysewrite_test.go
attr.go
attrs.go
bug_test.go
catch.go
dot.bnf
edges.go
edges_test.go
escape.go
escape_test.go
example_test.go
gographviz.go
graph.go
install-godeps.sh
issue21_test.go
issue26_test.go
issue32_test.go
nodes.go
relations.go
remove_test.go
subgraphs.go
write.go

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

You can’t perform that action at this time.