gobin

package
v1.11.5 Latest Latest
Warning

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

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

Documentation

Overview

Package gobin implements retrieving, downloading, and running go binaries using a remote path and version.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, fullPath, buildDir, buildPath string, printPath bool) error

Run actually performs the binary retrieval, installation, and running.

Types

type Module

type Module struct {
	// The unmodified/parsed import path, includes the command, if present
	OriginalImport string

	// Path is the module path
	Path string

	// Repo is a full VCS url that can be used to download this module
	Repo string

	// Version is a git ref that this correlates to (generally @vx.x.x)
	Version string
	// contains filtered or unexported fields
}

Module represents a Go module.

func (*Module) GetBinaryCache

func (m *Module) GetBinaryCache() (string, error)

GetBinaryCache returns the path that a binary should located, if it's been built before

func (*Module) GetCommandPath

func (m *Module) GetCommandPath() string

GetCommandPath attempts to resolve the directory for building from source from a import path. This handles removal of major versions.

Jump to

Keyboard shortcuts

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