Documentation
¶
Index ¶
- func FindRuntimeVersionDir(base string, entries []os.DirEntry, version string) (string, error)
- func FormatName(s string) string
- func GetDataDir() string
- func GetRuntimePath(runtime, version string, tools ...string) (map[string]string, error)
- func GetVfox() (string, error)
- func PrintColoredLogLine(...)
- type BlockDevice
- type BuildInfo
- type DiskUsage
- type HardwareInfo
- type StorageInfo
- type SystemInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindRuntimeVersionDir ¶
get a runtime version directory
func FormatName ¶
func GetDataDir ¶
func GetDataDir() string
func GetRuntimePath ¶
getRuntimePath finds the runtime binary in ~/.version-fox/cache/<runtime>
func PrintColoredLogLine ¶
func PrintColoredLogLine(line, colorReset, colorRed, colorYellow, colorBlue, colorGray, colorGreen string)
Types ¶
type BlockDevice ¶
type HardwareInfo ¶
type HardwareInfo struct {
OS string `json:"os"`
Arch string `json:"arch"`
Kernel *string `json:"kernel,omitempty"`
Hostname *string `json:"hostname,omitempty"`
CPUCount int `json:"cpu_count"`
MemTotal *string `json:"mem_total,omitempty"`
MemUsed *string `json:"mem_used,omitempty"`
MemFree *string `json:"mem_free,omitempty"`
SwapTotal *string `json:"swap_total,omitempty"`
SwapUsed *string `json:"swap_used,omitempty"`
}
type StorageInfo ¶
type StorageInfo struct {
Partitions []DiskUsage `json:"partitions,omitempty"`
Devices []BlockDevice `json:"devices,omitempty"`
}
type SystemInfo ¶
type SystemInfo struct {
Build BuildInfo `json:"build"`
HW HardwareInfo `json:"hardware"`
Storage StorageInfo `json:"storage"`
}
func GetSystemInfo ¶
func GetSystemInfo() (SystemInfo, error)
Click to show internal directories.
Click to hide internal directories.