Documentation ¶
Index ¶
- Constants
- type DAG
- func (d *DAG) Add(pkg *packages.Package, includeTests bool) (*Node, error)
- func (d *DAG) CheckComplete() error
- func (d *DAG) CheckForCycles() error
- func (d *DAG) Find(importPath string) *Node
- func (d *DAG) Obtain(importPath string) *Node
- func (d *DAG) Remove(importPath string) error
- func (d *DAG) VisitAll(ctx context.Context, v Visitor, concurrency int) error
- func (d *DAG) VisitAllFromLeft(ctx context.Context, v Visitor) error
- func (d *DAG) VisitAllFromRight(ctx context.Context, v Visitor) error
- type Flags
- type Generator
- type GeneratorFunc
- type GoFile
- type Import
- type Logger
- type Node
- type NodeBits
- type SFile
- type VisitDirection
- type Visitor
- type VisitorFunc
Constants ¶
View Source
const ( Left = 0 Right = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAG ¶
type DAG struct {
// contains filtered or unexported fields
}
func (*DAG) CheckComplete ¶
func (*DAG) CheckForCycles ¶
func (*DAG) Obtain ¶
Obtain a Node by finding it or creating it and lock it. Callers of Obtain must release the lock.
func (*DAG) VisitAllFromLeft ¶
VisitAllFromLeft visits each node from the left. NOTE: do not Lock/Unlock the node, VisitAllFromLeft will Lock it for you.
type GeneratorFunc ¶
func (GeneratorFunc) Generate ¶
func (g GeneratorFunc) Generate(ctx context.Context, node *Node, goFile GoFile, writer io.WriteCloser) error
type VisitDirection ¶
type VisitDirection int
Click to show internal directories.
Click to hide internal directories.