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)
Click to show internal directories.
Click to hide internal directories.