git.sr.ht/~pingoo/stdx@v0.0.0-20240218134121-094174641f6e/sysinfo/bios.go (about) 1 // Copyright © 2016 Zlatko Čalušić 2 // 3 // Use of this source code is governed by an MIT-style license that can be found in the LICENSE file. 4 5 package sysinfo 6 7 // BIOS information. 8 type BIOS struct { 9 Vendor string `json:"vendor,omitempty"` 10 Version string `json:"version,omitempty"` 11 Date string `json:"date,omitempty"` 12 } 13 14 func (si *SysInfo) getBIOSInfo() { 15 si.BIOS.Vendor = slurpFile("/sys/class/dmi/id/bios_vendor") 16 si.BIOS.Version = slurpFile("/sys/class/dmi/id/bios_version") 17 si.BIOS.Date = slurpFile("/sys/class/dmi/id/bios_date") 18 }