Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var OnClassic bool
OnClassic states whether the process is running inside a classic Ubuntu system or a native Ubuntu Core image.
View Source
var OnWSL bool
OnWSL states whether the process is running inside the Windows Subsystem for Linux
View Source
var Series = "16"
Series holds the Ubuntu Core series for snapd to use.
Functions ¶
func DistroLike ¶
DistroLike checks if the distribution ID or ID_LIKE matches one of the given names.
func MockOnClassic ¶
func MockOnClassic(onClassic bool) (restore func())
MockOnClassic forces the process to appear inside a classic Ubuntu system or a native image for testing purposes.
func MockReleaseInfo ¶
func MockReleaseInfo(osRelease *OS) (restore func())
MockReleaseInfo fakes a given information to appear in ReleaseInfo, as if it was read /etc/os-release on startup.
func SystemctlSupportsUserUnits ¶
func SystemctlSupportsUserUnits() bool
SystemctlSupportsUserUnits returns true if the systemctl utility supports user units.
Types ¶
Click to show internal directories.
Click to hide internal directories.