https://github.com/awalterschulze/gographviz
Parses the Graphviz DOT language in golang
https://github.com/awalterschulze/gographviz
go golang graphviz graphviz-dot-language parse
Last synced: 6 months ago
JSON representation
Parses the Graphviz DOT language in golang
- Host: GitHub
- URL: https://github.com/awalterschulze/gographviz
- Owner: awalterschulze
- License: other
- Created: 2015-03-14T18:27:00.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2023-02-28T18:35:05.000Z (over 2 years ago)
- Last Synced: 2025-04-13T17:46:47.430Z (7 months ago)
- Topics: go, golang, graphviz, graphviz-dot-language, parse
- Language: Go
- Homepage:
- Size: 399 KB
- Stars: 560
- Watchers: 12
- Forks: 74
- Open Issues: 8
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
- awesome-go-cn - gographviz
- awesome-go - gographviz - Parses the Graphviz DOT language in golang - ★ 222 (Text Processing)
- awesome-go-extra - gographviz - 03-14T18:27:00Z|2022-06-01T18:49:53Z| (Bot Building / Parsers/Encoders/Decoders)
- awesome-go-cn - gographviz
- awesome-go-plus - gographviz - Parses the Graphviz DOT language.  (Text Processing / Parsers/Encoders/Decoders)
- fucking-awesome-go - :octocat: gographviz - Parses the Graphviz DOT language. :star: 42 :fork_and_knife: 10 (Text Processing / Advanced Console UIs)
- awesome-go - gographviz - Parses the Graphviz DOT language. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go - gographviz - | - | - | (Text Processing / HTTP Clients)
- awesome-go - gographviz - Parses the Graphviz DOT language. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go - gographviz - Parses the Graphviz DOT language. - :arrow_down:95 - :star:55 (Text Processing / HTTP Clients)
- awesome-graphviz - gographviz - a Graphviz parser for go *Walter Schulze*. (Content / Language Bindings)
- awesome-go-cn - gographviz
- fucking-awesome-go - gographviz - Parses the Graphviz DOT language. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go-zh - gographviz
- awesome-go - gographviz - Parses the Graphviz DOT language. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go - gographviz - Parses the Graphviz DOT language. (<span id="文字处理-text-processing">文字处理 Text Processing</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go-with-stars - gographviz - Parses the Graphviz DOT language. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go - gographviz - Parses the Graphviz DOT language. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go - gographviz - Parses the Graphviz DOT language. (Text Processing / Parsers/Encoders/Decoders)
- awesome-Char - gographviz - Parses the Graphviz DOT language. (Text Processing / HTTP Clients)
- zero-alloc-awesome-go - gographviz - Parses the Graphviz DOT language. (Text Processing / Parsers/Encoders/Decoders)
- awesome-go-cn - gographviz
- awesome-go - gographviz - Parses the Graphviz DOT language. (Text Processing / HTTP Clients)
- awesome-go - gographviz - Parses the Graphviz DOT language. (Text Processing / Advanced Console UIs)
README
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](http://code.google.com/p/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](https://godoc.org/github.com/awalterschulze/gographviz) includes some more examples.
- [How to implement an anonymous subgraph](https://github.com/awalterschulze/gographviz/issues/59)
### Installation ###
go get github.com/awalterschulze/gographviz
### Build and Tests ###
[](https://github.com/awalterschulze/gographviz/actions)
### Users ###
- [aptly](https://github.com/smira/aptly) - Debian repository management tool
- [gorgonia](https://github.com/chewxy/gorgonia) - A Library that helps facilitate machine learning in Go
- [imagemonkey](https://imagemonkey.io/graph?editor=true) - Let's create our own image dataset
- [depviz](https://github.com/moul/depviz) - GitHub dependency visualizer (auto-roadmap)
- [kustomize-graph](https://github.com/jpreese/kustomize-graph) - A tool to visualize Kustomize dependencies
- [inframap](https://github.com/cycloidio/inframap) - Read your tfstate or HCL to generate a graph specific for each Terraform provider
- [Antrea Traceflow](https://github.com/vmware-tanzu/antrea/blob/master/docs/traceflow-guide.md) supports using Traceflow for network diagnosis for Antrea, a Kubernetes networking solution intended to be Kubernetes native
### Mentions ###
[Using Golang and GraphViz to Visualize Complex Grails Applications](http://ilikeorangutans.github.io/2014/05/03/using-golang-and-graphviz-to-visualize-complex-grails-applications/)