toolset

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileRecord added in v0.4.0

type FileRecord struct {
	Record map[string]string
	Path   string
	// contains filtered or unexported fields
}

FileRecord is a file that contains a map of string to string

func NewFileRecord added in v0.4.0

func NewFileRecord(path string) (*FileRecord, error)

NewFileRecord creates a new FileRecord from a file if the file does not exist, an empty FileRecord is returned

func (*FileRecord) Save added in v0.4.0

func (m *FileRecord) Save() error

type MultiToolVersions

type MultiToolVersions []*ToolVersion

func NewMultiToolVersions

func NewMultiToolVersions(paths []string) (MultiToolVersions, error)

func (MultiToolVersions) Add

func (m MultiToolVersions) Add(name, version string)

func (MultiToolVersions) FilterTools

func (m MultiToolVersions) FilterTools(filter func(name, version string) bool) map[string]string

FilterTools filters tools by the given filter function and return the first one you find.

func (MultiToolVersions) Save

func (m MultiToolVersions) Save() error

type ToolVersion

type ToolVersion struct {
	*FileRecord
}

ToolVersion represents a .tool-versions file

func NewToolVersion

func NewToolVersion(dirPath string) (*ToolVersion, error)

Jump to

Keyboard shortcuts

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