shirou / gopsutil

psutil for golang
Other
10.36k stars 1.57k forks source link

use VERSION_ID from os-release #1585

Closed brycekahle closed 6 months ago

brycekahle commented 6 months ago

VERSION_ID is more appropriate for scripts and other usages, since VERSION can contain spaces and codenames

from os-release manpage:

VERSION=
           A string identifying the operating system version, excluding
           any OS name information, possibly including a release code
           name, and suitable for presentation to the user. This field
           is optional.

           Examples: "VERSION=17", "VERSION="17 (Beefy Miracle)"".

 VERSION_ID=
           A lower-case string (mostly numeric, no spaces or other
           characters outside of 0–9, a–z, ".", "_" and "-") identifying
           the operating system version, excluding any OS name
           information or release code name, and suitable for processing
           by scripts or usage in generated filenames. This field is
           optional.

           Examples: "VERSION_ID=17", "VERSION_ID=11.04".