Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong platform information for PopOS #1469

Open
1 task done
vladislav-sharapov opened this issue May 21, 2023 · 0 comments
Open
1 task done

Wrong platform information for PopOS #1469

vladislav-sharapov opened this issue May 21, 2023 · 0 comments

Comments

@vladislav-sharapov
Copy link

Describe the bug

host.Info() doesn't return correct platform information in the case of a PopOS system.

To Reproduce

package main

import (
    "fmt"
    "github.com/shirou/gopsutil/v3/host"
)

func main() {
    hostInfo, _ := host.Info()

    fmt.Printf("Platform: %s\nPlatform family: %s\nPlatform version: %s\n", hostInfo.Platform, hostInfo.PlatformFamily, hostInfo.PlatformVersion)
}

Output:

Platform: debian
Platform family: debian
Platform version: bookworm/sid

Expected behavior

I expect more relevant information from /etc/os-release, for instance:

Platform: PopOS
Platform family: ubuntu
Platform version: 22.04

Environment (please complete the following information):

  • Linux: [paste contents of /etc/os-release and the result of uname -a]
$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os
$ uname -a
Linux hostname 6.2.6-76060206-generic #202303130630~1683753207~22.04~77c1465 SMP PREEMPT_DYNAMIC Wed M x86_64 x86_64 x86_64 GNU/Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants