Documentation ¶
Overview ¶
Package osrelease is to parse a os release file content.
Index ¶
Constants ¶
View Source
const ( // EtcOsRelease is the path of os-release file. EtcOsRelease string = "/etc/os-release" // DebianID is the identifier used by the Debian operating system. DebianID = "debian" // FedoraID is the identifier used by the Fedora operating system. FedoraID = "fedora" // UbuntuID is the identifier used by the Ubuntu operating system. UbuntuID = "ubuntu" // RhelID is the identifier used by the Rhel operating system. RhelID = "rhel" // CentosID is the identifier used by the Centos operating system. CentosID = "centos" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { ID string IDLike string Name string PrettyName string Version string VersionID string }
Data exposes the most common identification parameters.
func (*Data) IsLikeDebian ¶
IsLikeDebian will return true for Debian and any other related OS, such as Ubuntu.
func (*Data) IsLikeFedora ¶
IsLikeFedora will return true for Fedora and any other related OS, such as CentOS or RHEL.
Click to show internal directories.
Click to hide internal directories.