tools

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMap

func GetMap() map[string]Tool

func Install

func Install(tools []Tool) error

Install creates the directories necessary to install the provided tools and

func Names

func Names() []string

func Remove

func Remove(tools []Tool) error

Remove removes the provided tools from the installation directory

func RemoveInstallDir

func RemoveInstallDir() error

Types

type Tool

type Tool interface {
	// Name returns the name of the tool
	Name() string

	// ExecutableName returns the main binary name of the tool that will be installed in latest
	ExecutableName() string

	// Install fetches the latest tool from it's respective source, installs
	// it in a tool-unique directory under the provided rootDir, and symlinks
	// it to provided the latestDir
	Install() error

	// Configure currently unused
	Configure() error

	// Remove uninstalls the tool by deleting its tool-unique directory under
	// the provided rootDir and unlinking itself from the latestDir
	Remove() error

	// Installed validates whether the tool has already been installed under the
	// provided rootDir or not
	Installed() (bool, error)

	// InstalledVersion gets the version installed in latest folder
	InstalledVersion() (string, error)

	// LatestVersion gets the latest version available on repo
	LatestVersion() (string, error)
}

func ListInstalled

func ListInstalled() ([]Tool, error)

ListInstalled returns a slice containing all tools the current machine has installed

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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