build

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGoVersion

func GetGoVersion(ctx context.Context) (*version.Version, error)

GetGoVersion obtains version of locally installed Go via "go version"

Types

type CleanupFunc

type CleanupFunc func(context.Context)

CleanupFunc represents a function to be called once Go is no longer needed e.g. to remove any version installed temporarily per requirements

type Go added in v0.5.0

type Go struct {
	Cmd         string
	CleanupFunc CleanupFunc
	Version     *version.Version
}

type GoBuild

type GoBuild struct {
	Version         *version.Version
	DetectVendoring bool
	// contains filtered or unexported fields
}

GoBuild represents a Go builder (to run "go build")

func (*GoBuild) Build

func (gb *GoBuild) Build(ctx context.Context, repoDir, targetDir, binaryName string) (string, error)

Build runs "go build" within a given repo to produce binaryName in targetDir

func (*GoBuild) Remove

func (gb *GoBuild) Remove(ctx context.Context) error

func (*GoBuild) SetLogger

func (gb *GoBuild) SetLogger(logger *log.Logger)

type GoIsInstalled

type GoIsInstalled struct {
	RequiredVersion version.Constraints
}

GoIsInstalled represents a checker of whether Go is installed locally

func (*GoIsInstalled) Check

func (gii *GoIsInstalled) Check(ctx context.Context) error

Check checks whether any Go version is installed locally

Jump to

Keyboard shortcuts

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