func (d *DAG) DeleteVertex(vertex *Vertex) error {
	existsVertex := false
	d.mu.Lock()
	defer d.mu.Unlock()
	for _, v := range d.vertices.Values() {
		if v == vertex {
			existsVertex = true
		}
	}
	if !existsVertex {
		return fmt.Errorf("Vertex with ID %v not found", vertex.ID)
	}
	d.vertices.Remove(vertex.ID)
	return nil
}
DeleteVertex deletes a vertex and all the edges referencing it from the
graph.
package dag
import (
	"fmt"
	"sync"
	"github.com/goombaio/orderedmap"
)
type DAG struct {
	mu       sync.Mutex
	vertices orderedmap.OrderedMap
}
func NewDAG() *DAG {
	d := &DAG{
		vertices: *orderedmap.NewOrderedMap(),
	}
	return d
}
func (d *DAG) AddVertex(v *Vertex) error {
	d.mu.Lock()
	defer d.mu.Unlock()
	d.vertices.Put(v.ID, v)
	return nil
}