Documentation
¶
Overview ¶
Package gocommand implements LLGo commands delegated to the Go toolchain.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Invocation ¶
type Invocation struct {
Command string
Args []string
Env []string
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
Executable string
}
Invocation describes one invocation of a command in the Go toolchain. Empty fields use the current process environment, executable, and standard streams.
func Build ¶
func Build(command string, args []string) (Invocation, error)
Build creates an invocation for a package-aware Go command. LLGo's -target flag is consumed here; target and user build tags are merged with LLGo's defaults, except for list module queries which do not select source files.
func (Invocation) Run ¶
func (inv Invocation) Run() error
Run invokes the real Go tool while preventing a go-to-llgo alias from recursively starting LLGo again.