bud

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compiler

type Compiler struct {
	Env        Env
	Stdout     io.Writer
	Stderr     io.Writer
	ModCacheRW bool
	// contains filtered or unexported fields
}

func Find

func Find(dir string) (*Compiler, error)

func Load

func Load(module *gomod.Module) (*Compiler, error)

func (*Compiler) Compile

func (c *Compiler) Compile(ctx context.Context, flag *bud.Flag) (p *Project, err error)

type Env

type Env map[string]string

func (Env) Add

func (e Env) Add(env Env) Env

func (Env) List

func (e Env) List() (env []string)

type Project

type Project struct {
	Module *gomod.Module
	Env    Env
	Stdout io.Writer
	Stderr io.Writer
}

func (*Project) Build

func (p *Project) Build(ctx context.Context) (*bud.App, error)

func (*Project) Builder

func (p *Project) Builder(ctx context.Context) *exe.Cmd

func (*Project) Execute

func (p *Project) Execute(ctx context.Context, args ...string) error

Execute a custom command

func (*Project) Executor

func (p *Project) Executor(ctx context.Context, args ...string) *exe.Cmd

func (*Project) Run

func (p *Project) Run(ctx context.Context, listener net.Listener) (*exe.Cmd, error)

func (*Project) Runner

func (p *Project) Runner(ctx context.Context, listener net.Listener) (*exe.Cmd, error)

Jump to

Keyboard shortcuts

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