toolversions

package
v0.0.0-...-6e17766 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASDFVersionReporter

type ASDFVersionReporter struct {
	// contains filtered or unexported fields
}

func NewASDFVersionReporter

func NewASDFVersionReporter(cmdLocator env.CommandLocator, cmdFactory command.Factory, logger log.Logger, userHomeDir string) ASDFVersionReporter

func (*ASDFVersionReporter) CurrentToolVersions

func (r *ASDFVersionReporter) CurrentToolVersions() (map[string]ToolVersion, error)

func (*ASDFVersionReporter) IsAvailable

func (r *ASDFVersionReporter) IsAvailable() bool

type ToolVersion

type ToolVersion struct {
	Version        string `json:"version"`
	IsInstalled    bool   `json:"is_installed"`
	DeclaredByFile string `json:"declared_by_file"`
	IsGlobal       bool   `json:"is_global"`
}

type ToolVersionReporter

type ToolVersionReporter interface {
	// IsAvailable returns true if the tool version manager is available and actively manages the tool versions.
	IsAvailable() bool

	// CurrentToolVersions returns a snapshot of the currently active tools and versions.
	// The returned map is keyed by tool name.
	// Tool names and reported versions are implementation-specific. Tool names are normalized to lowercase.
	CurrentToolVersions() (map[string]ToolVersion, error)
}

Jump to

Keyboard shortcuts

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