Documentation ¶
Index ¶
- Variables
- func CopyAllFiles(srcDir string, destDir string) error
- func CopyFile(src string, dest string) error
- func ExpandVariables(vars map[string]string, str string) string
- func FileExists(filePath string) (bool, error)
- func HostHasEFI() bool
- func IntSliceContains(is []int, value int) bool
- func IsCheckCoverage() bool
- func IsClearLinux() bool
- func IsLatestVersion(version string) bool
- func IsRoot() bool
- func IsStdoutTTY() bool
- func IsVirtualBox() bool
- func LookupISOTemplateDir() (string, error)
- func LookupLocaleDir() (string, error)
- func LookupThemeDir() (string, error)
- func MkdirAll(path string, perm os.FileMode) error
- func ParseOSClearVersion() error
- func RunDiskPartitionTool(tmpYaml string, lockFile string, diskUtilCmd string, remove []string, gui bool) (string, error)
- func SetLocale(language string)
- func StringSliceContains(sl []string, str string) bool
- func VerifyRootUser() string
- func VersionStringUint(versionString string) (uint, error)
- func VersionUintString(versionUint uint) string
Constants ¶
This section is empty.
Variables ¶
var ClearVersion string
ClearVersion is running version of the OS
var Locale *gotext.Locale
Locale is used to access the localization functions
Functions ¶
func CopyAllFiles ¶
CopyAllFiles copy all of the files in a directory recursively
func ExpandVariables ¶
ExpandVariables iterates over vars map and replace all the occurrences of ${var} or $var in the str string
func FileExists ¶
FileExists returns true if the file or directory exists else it returns false and the associated error
func IntSliceContains ¶
IntSliceContains returns true if is contains value, returns false otherwise
func IsCheckCoverage ¶
func IsCheckCoverage() bool
IsCheckCoverage returns true if CHECK_COVERAGE variable is set
func IsClearLinux ¶
func IsClearLinux() bool
IsClearLinux checks if the current OS is Clear by looking for Swupd Mostly used in Go Testing
func IsLatestVersion ¶
func IsRoot ¶
func IsRoot() bool
IsRoot checks if the current User is root (UID 0) Mostly used in Go Testing
func IsStdoutTTY ¶
func IsStdoutTTY() bool
IsStdoutTTY returns true if the stdout is attached to a tty
func IsVirtualBox ¶
func IsVirtualBox() bool
IsVirtualBox returns true if the running system is executed from within VirtualBox Attempt to parse the System Management BIOS (SMBIOS) and Desktop Management Interface (DMI) to determine if we are executing inside a VirtualBox. Ignoring error conditions and assuming we are not VirtualBox.
func LookupISOTemplateDir ¶
LookupISOTemplateDir returns the directory to use for reading template files for ISO creation. It will look in the local developers build area first, or the ENV variable, and finally the standard system install location
func LookupLocaleDir ¶
LookupLocaleDir returns the directory to use for reading locale files for the UI.
func LookupThemeDir ¶
LookupThemeDir returns the directory to use for reading theme files for the UI.
func MkdirAll ¶
MkdirAll similar to go's standard os.MkdirAll() this function creates a directory named path, along with any necessary parents but also checks if path exists and takes no action if that's true.
func ParseOSClearVersion ¶
func ParseOSClearVersion() error
ParseOSClearVersion parses the current version of the Clear Linux OS
func RunDiskPartitionTool ¶
func RunDiskPartitionTool(tmpYaml string, lockFile string, diskUtilCmd string, remove []string, gui bool) (string, error)
RunDiskPartitionTool creates and executes a script which launches the disk partitioning tool and then returns to the installer.
func SetLocale ¶
func SetLocale(language string)
SetLocale sets the locale of the installer based on the selected language
func StringSliceContains ¶
StringSliceContains returns true if sl contains str, returns false otherwise
func VerifyRootUser ¶
func VerifyRootUser() string
VerifyRootUser returns an error if we're not running as root
func VersionStringUint ¶
VersionStringUint converts string version to an uint version
func VersionUintString ¶
VersionUintString converts an uint version to the string version
Types ¶
This section is empty.