Skip to content

Directed graph in Go, with topological sort, for dependency resolution

License

Notifications You must be signed in to change notification settings

amicolabs/graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graph

Simple implementation of a directed graph in Go, with just a topological sort algorithm using Kahn's algorithm. Intended to be used for dependency resolution.

Usage

g := graph.New[string]()
g.Add("b", []string{"c"})
g.Add("c", []string{"a"})

s, err := g.Sort() // []string{"b", "c", "a"}

About

Directed graph in Go, with topological sort, for dependency resolution

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages