prerequisites

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GOOSDarwin = "darwin"
	GOOSLinux  = "linux"
)
View Source
const (
	ToolGit      = "git"
	ToolDocker   = "docker"
	ToolKind     = "kind"
	ToolMinikube = "minikube"
	ToolKubectl  = "kubectl"
	ToolHelm     = "helm"
	ToolBind     = "kubectl-bind"
)

Variables

This section is empty.

Functions

func CheckDockerRunning

func CheckDockerRunning()

CheckDockerRunning checks if docker is running. If it is not running, exit the program with an error.

func CheckRequiredTools

func CheckRequiredTools(requiredTools []RequiredTool)

CheckRequiredTools checks if each given tool is present on the system. If a tool is missing, info about the tool is printed. At the end, if any tool is missing, the program exits with an error.

func GetCommonRequiredTools

func GetCommonRequiredTools() map[string]RequiredTool

GetCommonRequiredTools returns a set of tools commonly required by different CLI commands. Each command can pick tools that it requires from this set.

func IsToolAvailable

func IsToolAvailable(tool RequiredTool) bool

IsToolAvailable checks if a given tool is present on the system. If the tool is missing, info about the tool is printed. Returns true if the tool is present.

Types

type RequiredTool

type RequiredTool struct {
	// CommandName is the command the tool is invoked with on the system.
	CommandName string
	// HelpCommands contains commands that help install the tool on a specific operating system.
	// e.g. HelpCommands["darwin"]
	HelpCommands map[string]string
	// HelpURLs contains URLs with more information on how to install the tool on a specific
	// operating system. e.g. HelpCommands["linux"]
	HelpURLs map[string]string
}

A RequiredTool represents a tool that must be present on the system. It includes information on how to install it for specific operating systems.

Jump to

Keyboard shortcuts

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