This commit is contained in:
ge
2025-12-09 11:46:57 +03:00
commit d51a419552
8 changed files with 179 additions and 0 deletions

20
README.md Normal file
View File

@@ -0,0 +1,20 @@
# Freedesktop OS Release
`os_release` module implements the os-release, initrd-release and extension-release
file parser per Freedesktop standard. Those files are intended for operating system
identification. Learn more at
[os-release(5)](https://www.freedesktop.org/software/systemd/man/latest/os-release.html)
manual page.
Usage example:
```v
import os_release
fn main() {
release_data := os_release.os_release()
os_name := release_data['PRETTY_NAME'] or { 'Linux' }
os_version := release_data['VERSION_ID'] or { '0' }
println('OS: ${os_name} ${os_version}')
}
```