func nextRunnableNodes(waitingNodes, doneNodes map[*Node]struct{}) []*Node {
	var runnableNodes []*Node
outer:
	for waitingNode := range waitingNodes {
		for dep := range waitingNode.Dependencies {
			if _, ok := doneNodes[dep]; !ok {
				continue outer
			}
		}
		runnableNodes = append(runnableNodes, waitingNode)
	}
	return runnableNodes
}
nextRunnableNodes finds a list of nodes from waitingNodes that can be run
in concurrent safely.
package main
import (
	"context"
	"io"
)
type ResultNode struct {
	*Node
	Err error
}