Documentation
¶
Index ¶
- func Load(ctx context.Context, pkgdir string, f func(*exec.Cmd) error) error
- func LoadPkg(ctx context.Context, pkgdir, pkgname string, scope *types.Scope, ...) error
- func LoadTargets(ctx context.Context, pkgdir, pkgname string, targets []string, ...) error
- func Run(ctx context.Context, pkgdir string, args ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadTargets ¶
func Run ¶
Run uses Load to load the Go package in the given directory and turn it into an executable binary. It then runs the program as:
PROG [-v] CWD TMPFILE ARGS...
where CWD is the current working directory, TMPFILE is the name of a temporary file where the program sends its output, and ARGS are the additional arguments passed to Run.
Run parses the output in the temporary file: a JSON-encoded list of error strings. If the list is empty, Run returns nil. Otherwise it converts those strings to an error (using multierr.Combine if there are two or more) and returns it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.