golang

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 6 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	// contains filtered or unexported fields
}

Cli wraps the Go CLI for building Go projects.

func NewCli

func NewCli(commandRunner exec.CommandRunner) *Cli

NewCli creates a new instance of the Go CLI wrapper.

func (*Cli) Build

func (cli *Cli) Build(
	ctx context.Context,
	projectDir string,
	outputName string,
	env []string,
) error

Build compiles the Go project at the given directory, outputting the binary with the specified name. Environment variables are passed to the build command to support cross-compilation.

func (*Cli) CheckInstalled

func (cli *Cli) CheckInstalled(ctx context.Context) error

CheckInstalled verifies Go is installed and meets the minimum version.

func (*Cli) InstallUrl

func (cli *Cli) InstallUrl() string

InstallUrl returns the URL for installing Go.

func (*Cli) ModDownload

func (cli *Cli) ModDownload(ctx context.Context, projectDir string, env []string) error

ModDownload runs 'go mod download' to fetch dependencies.

func (*Cli) Name

func (cli *Cli) Name() string

Name returns the display name of the tool.

Jump to

Keyboard shortcuts

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