New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dag package #2141
Add dag package #2141
Conversation
I've spent some more time on this in support of the |
Sure! Let's go with this one if you see it works as we need it. What I'm missing from this package (probably I'm not thinking it or checking it through), are these two:
|
Isn't that just: graph := NewGraph()
graph.Add("root") // whatever your concept of the starting point is
graph.TopoSort("root") ?
I don't understand the question, can you clarify? |
|
Order is always deterministic, it uses the sort order of the keys, so it will be |
Competing idea to #2138.
This started as a vendoring of https://github.com/stevenle/topsort with proper license attribution, plus some cleanups to more closely match our code standards, but evolved into more functionality and more cleanups. We can edit this as we want for our needs. It's a super-simple package, and this is a universal concept.
@unmultimedio any thoughts about starting with this as a base?