Documentation
¶
Overview ¶
Package tools provides automatic installation and management of required Go tools
Index ¶
- Variables
- func CleanCache()
- func EnsureInstalled(ctx context.Context, toolName string) error
- func GetGoBin() string
- func GetGoPath() string
- func GetInstallTimeout() time.Duration
- func GetRetryConfig() (int, time.Duration)
- func GetToolPath(toolName string) (string, error)
- func InstallAllTools(ctx context.Context) error
- func InstallTool(ctx context.Context, tool *Tool) error
- func IsInstalled(toolName string) bool
- func LoadVersionsFromEnv()
- func SetInstallTimeout(timeout time.Duration)
- func SetRetryConfig(attempts int, delay time.Duration)
- type Tool
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnknownTool is returned when a tool is not recognized ErrUnknownTool = errors.New("unknown tool") // ErrInstallFailed is returned when tool installation fails ErrInstallFailed = errors.New("tool installation failed") // ErrToolNotInPath is returned when a tool is installed but not found in PATH ErrToolNotInPath = errors.New("tool installed but not found in PATH") // ErrInstallTimeout is returned when tool installation times out ErrInstallTimeout = errors.New("tool installation timed out") )
Error variables for tool installation
Functions ¶
func EnsureInstalled ¶
EnsureInstalled ensures a tool is installed, installing it if necessary
func GetInstallTimeout ¶ added in v1.2.0
GetInstallTimeout returns the current tool installation timeout
func GetRetryConfig ¶ added in v1.2.0
GetRetryConfig returns the current retry configuration
func GetToolPath ¶
GetToolPath returns the full path to a tool binary
func InstallAllTools ¶
InstallAllTools installs all required tools
func InstallTool ¶
InstallTool installs a specific tool
func IsInstalled ¶
IsInstalled checks if a tool is installed and available in PATH
func LoadVersionsFromEnv ¶
func LoadVersionsFromEnv()
LoadVersionsFromEnv loads tool versions from environment variables
func SetInstallTimeout ¶ added in v1.2.0
SetInstallTimeout configures the timeout for tool installation
func SetRetryConfig ¶ added in v1.2.0
SetRetryConfig configures retry behavior for network operations