gocommand

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gocommand implements LLGo commands delegated to the Go toolchain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMain

func BuildMain(command string, args []string)

BuildMain runs a Go command after applying LLGo source-selection rules.

func Exit

func Exit(command string, err error)

Exit preserves an exit status already reported by Go. Errors produced before Go starts receive a stable LLGo command prefix.

func Main

func Main(command string, args []string)

Main runs a Go command without changing its arguments or environment.

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.

Jump to

Keyboard shortcuts

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