Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNilFunction = errors.New("got nil, expected a function")
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
Graph *Graph
}
func NewContainer ¶
func NewContainer() *Container
func (Container) CreateType ¶
CreateType returns a newly created value of the supplied type
type Graph ¶
func GraphFromFunc ¶
GraphFromFunc takes in a function and returns a graph containing the functions dependencies and what types it returns
func MergeGraphs ¶
type In ¶
type In struct{}
In is used to mark a struct where each member should be treated as its own dependency
type Vertex ¶
type Vertex struct { // the reflect.Type value that the function will return Typ reflect.Type // slice of pointers to the graphs edges relating to this vertex // each edge represents a dependency of the function, incoming being // the arguments required, and outgoing for the values provided from this function OutgoingEdges Edges IncomingEdges Edges // contains filtered or unexported fields }
Vertex represents a reflect.Type and a function that is used to create it.
Click to show internal directories.
Click to hide internal directories.