Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadToFolder ¶
DownloadToFolder creates a folder and a file, uses the ORAS client to copy from the remote repository to the file, and makes the file executable by everyone. An error is returned if any of these steps fail.
func GetExecutableName ¶
GetExecutableName returns the executable name of a given tool based on the operating system. It returns the tool name with a .exe extension if the operating system is Windows, otherwise it returns the tool name as is.
func GetLocalFilepath ¶
GetLocalFilepath checks for an override path in an environment variable, and if it exists, returns it. If not, it returns the path to the binary in the user's home directory. It returns an error if it cannot find the user's home directory or if the filename is invalid.
func GetValidPlatform ¶
GetValidPlatform checks if the given OS and architecture combination is supported and returns the corresponding platform string if it is, or an error if it is not.
Types ¶
type ErrToolNotFound ¶
func (ErrToolNotFound) Error ¶
func (e ErrToolNotFound) Error() string
Error() returns a string containing the error message for the ErrToolNotFound struct.