Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrToolVersionsFailedParsingByteFormat is returned if tool-versions couldn't parse the byteData ErrToolVersionsFailedParsingByteFormat error = errors.New("failed to parse file") )
Functions ¶
func JoinPathWithWorkingDirectoryPath ¶
joinPathwithworkingDirectoryPath To merge File path with current working dire, unless file is an http url
Types ¶
type FileContent ¶
type FileContent struct { // FilePath defines the fullpath filename FilePath string // ContentRetriever is an interface to manipulate raw files ContentRetriever text.TextRetriever // Entries contains the .tool-versions representation of the file Entries []Entry }
func (*FileContent) Get ¶
func (f *FileContent) Get(key string) (string, error)
Query returns the value for a specific value from a .tool-versions file
func (*FileContent) Put ¶
func (f *FileContent) Put(key, value string) error
Put inserts or updates a key-value pair in the .tool-versions file
func (*FileContent) Read ¶
func (f *FileContent) Read(rootDir string) error
Read reads the content of a file after runtime validation
func (*FileContent) Write ¶
func (f *FileContent) Write() error
Click to show internal directories.
Click to hide internal directories.