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

unify all LinuxOSReleaseInfo id to lowercase #112

Open
J-ZhengLi opened this issue Jul 22, 2022 · 3 comments
Open

unify all LinuxOSReleaseInfo id to lowercase #112

J-ZhengLi opened this issue Jul 22, 2022 · 3 comments

Comments

@J-ZhengLi
Copy link

the documentation of that struct states the id as "A lower-case string", however, it is not a lowercase string on some distro such as openEuler.

output of debug printing:

Ok(
    LinuxOSReleaseInfo {
        id: Some(
            "openEuler",
        ),
        id_like: None,
        name: Some(
            "openEuler",
        ),
        pretty_name: Some(
            "openEuler 20.03 (LTS-SP1)",
        ),
        version: Some(
            "20.03 (LTS-SP1)",
        ),
        version_id: Some(
            "20.03",
        ),
        ...
    },
)
@FillZpp
Copy link
Owner

FillZpp commented Jul 25, 2022

@J-ZhengLi Please feel free to open a PR to fix the doc.

@J-ZhengLi
Copy link
Author

@J-ZhengLi Please feel free to open a PR to fix the doc.

Sure 🤔 but before I do, I have a simple question. I know this might be a job for the OS provider, but what's the downside of converting the return string to lowercase here?

@FillZpp
Copy link
Owner

FillZpp commented Jul 28, 2022

Emm, I don't think it's a good idea to add a convertion here. Maybe just let the return string be same to the real one from the OS provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants