Topological sort for Go.