Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Release ¶
type Release struct { Runtime string Arch string Name string Version string Windows windowsRelease Linux linuxRelease BSD bsdRelease MacOs macOsRelease }
Release contains all the info about os in nested structs All values in the top level of the struct are guaranteed in the sense that they are always returned. Nested structs are only populated for the os they are compiled for IE: Release.Windows will only have values if you are on windows
func GetVersion ¶
func GetVersion() Release
GetVersion Linux returns version info fetching os info for linux distros is more complicated process than it should be version information is collected via `uname` and `/etc/os-release` Returns:
- r.Runtime
- r.Arch
- r.Name
- r.Version
- r.Linux.Kernel
- r.Linux.Distro
- r.Linux.PkgMng
Click to show internal directories.
Click to hide internal directories.