Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator loads go files and runs generators on them.
func NewGenerator ¶
NewGenerator returns a new initialized Generator instance.
func (*Generator) Generate ¶
func (g *Generator) Generate( ctx context.Context, jobs int, gens map[gen.GeneratorName]gen.Func, ) <-chan opt.Result[gen.File]
Generate runs generator functions on Go's packages loaded AST. Returns the stream of generated contents. The jobs parameter specifies number of used goroutines for processing, if set as 0 number of cpu cores will be used.
Click to show internal directories.
Click to hide internal directories.