Chapter 50
stub/hardware
github.com/openfluke/welvet/stub/hardware🚧
Why it exists
Dispatchers and UIs need a portable host audit (OS/CPU/RAM/GPU).
What it is
Audit() → SystemAudit with linux /proc or platform fallbacks.
Go example
examples/50-stub-hardware/main.go
Run:
cd welvet/examples/50-stub-hardware && source ../env.sh && go run .package main
import (
"fmt"
"github.com/openfluke/welvet/stub/hardware"
)
func main() {
a := hardware.Audit()
fmt.Printf("%+v\n", a.CPU)
fmt.Println(hardware.Description())
}
Output
{Model:Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz Logical:12 GOMAXPROCS:12}
OS: linux | CPU: Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz (12) | RAM: 31.12 GB | GPU: Unknown GPU (0.0 GB)