github.com/beauknowssoftware/makehcl@v0.0.0-20200322000747-1b9bb1e1c008/internal/graph/constructGraph.go (about)

     1  package graph
     2  
     3  import (
     4  	"errors"
     5  
     6  	"github.com/beauknowssoftware/makehcl/internal/parse2"
     7  )
     8  
     9  func ConstructGraph(d *parse2.Definition, o Options) (*Graph, error) {
    10  	if o.GraphType != ImportGraph {
    11  		return nil, errors.New("invalid graph type")
    12  	}
    13  
    14  	return constructImportGraph(d), nil
    15  }