Awesome Go

gographviz

CategoryText Processing
SubcategoryParsers/Encoders/Decoders
Stars565

Parses the Graphviz DOT language

About gographviz

This repo has moved to https://git.awalterschulze.org/gographviz

The go module has been renamed to go.awalterschulze.org/gographviz

This new module name and new repo location allowed us to fix the tags to have go compatible versioning. The previous newest version v2.0.3 was renamed to v0.2.3 at the new repo location. Now at the new location and with the new module path, a new version was tagged v0.3.0.

You can upgrade to the new version at the new location with following require statement in your module

require go.awalterschulze.org/gographviz v0.3.0

You will also need to update your imports to this new module path

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)

package main

import "go.awalterschulze.org/gographviz"

func main() {
	graphAst, err := gographviz.ParseString(`digraph G {}`)
	if err != nil {
		panic(err)
	}
	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()
	println(output)
}

Documentation

Installation

go get go.awalterschulze.org/gographviz

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)
  • kustomize-graph - A tool to visualize Kustomize dependencies
  • inframap - Read your tfstate or HCL to generate a graph specific for each Terraform provider
  • Antrea Traceflow 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

Frequently Asked Questions

What is gographviz?

gographviz is a Text Processing library for the Go programming language. Parses the Graphviz DOT language

How do I install gographviz?

Install gographviz with the Go module system using `go get awalterschulze/gographviz`. Check the repository for the current installation instructions.

What category does gographviz belong to?

gographviz is listed under Text Processing, specifically Parsers/Encoders/Decoders.

← Back to Parsers/Encoders/Decoders