Skip to content

Commit

Permalink
pkg/utils: Mark a private function as such
Browse files Browse the repository at this point in the history
Reading the VERSION_ID field from the host operating system's
os-release(5) only needs to happen when initializing this package.

Fallout from 9e28255

#1304
  • Loading branch information
debarshiray committed Jun 7, 2023
1 parent 2568528 commit 4a1d9fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func init() {
hostID, err := GetHostID()
if err == nil {
if distroObj, supportedDistro := supportedDistros[hostID]; supportedDistro {
release, err := GetHostVersionID()
release, err := getHostVersionID()
if err == nil {
containerNamePrefixDefault = distroObj.ContainerNamePrefix
distroDefault = hostID
Expand Down Expand Up @@ -399,11 +399,11 @@ func GetHostVariantID() (string, error) {
return osRelease["VARIANT_ID"], nil
}

// GetHostVersionID returns the VERSION_ID from the os-release files
// getHostVersionID returns the VERSION_ID from the os-release files
//
// Examples:
// - host is Fedora 32, returned string is '32'
func GetHostVersionID() (string, error) {
func getHostVersionID() (string, error) {
osRelease, err := osrelease.Read()
if err != nil {
return "", err
Expand Down

0 comments on commit 4a1d9fc

Please sign in to comment.