MCPcopy
hub / github.com/containers/toolbox / getHostID

Function getHostID

src/pkg/utils/utils.go:448–455  ·  view source on GitHub ↗

getHostID returns the ID from the os-release files Examples: - host is Fedora, returned string is 'fedora'

()

Source from the content-addressed store, hash-verified

446// Examples:
447// - host is Fedora, returned string is 'fedora'
448func getHostID() (string, error) {
449 osRelease, err := osrelease.Read()
450 if err != nil {
451 return "", err
452 }
453
454 return osRelease["ID"], nil
455}
456
457// getHostVersionID returns the VERSION_ID from the os-release files
458//

Callers 2

initFunction · 0.85
IsP11KitClientPresentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…