getHostID returns the ID from the os-release files Examples: - host is Fedora, returned string is 'fedora'
()
| 446 | // Examples: |
| 447 | // - host is Fedora, returned string is 'fedora' |
| 448 | func 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 | // |
no outgoing calls
no test coverage detected
searching dependent graphs…