bake

package
v0.0.0-...-ffadd5b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BakePackageHistory = [...]string{
	"gitlab.com/firelizzard/bake",
}

BakePackageHistory is the history of package names used by Bake

Functions

func Generate

func Generate(ctx context.Context, wd string, env []string) []error

Generate loads the specified packages, locates generators, and executes them.

Types

type Generator

type Generator interface {
	Generate(*packages.Package, definitionLookup, *ast.File, io.Writer) []error
}

A Generator generates code.

type GenericFunction

type GenericFunction struct {
	Function   *types.Func
	TypeParams []*types.TypeName
	Targets    []*GenericFunctionTarget
}

func (*GenericFunction) Generate

func (g *GenericFunction) Generate(pkg *packages.Package, defs definitionLookup, src *ast.File, w io.Writer) []error

type GenericFunctionTarget

type GenericFunctionTarget struct {
	Name     string
	TypeArgs []*types.TypeName
}

type GenericMethod

type GenericMethod struct {
	Method       *types.Func
	ReceiverType *types.TypeName
	TypeParams   []*types.TypeName
	Targets      []*GenericMethodTarget
}

func (*GenericMethod) Generate

func (g *GenericMethod) Generate(pkg *packages.Package, defs definitionLookup, src *ast.File, w io.Writer) []error

type GenericMethodTarget

type GenericMethodTarget struct {
	ReceiverType *types.TypeName
	TypeArgs     []*types.TypeName
}

type GenericType

type GenericType struct {
	Type       *types.TypeName
	TypeParams []*types.TypeName
	Targets    []*GenericTypeTarget
}

func (*GenericType) Generate

func (g *GenericType) Generate(pkg *packages.Package, defs definitionLookup, src *ast.File, w io.Writer) []error

type GenericTypeTarget

type GenericTypeTarget struct {
	Name     string
	TypeArgs []*types.TypeName
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL