Files
ctrld/internal/system/chassis_others.go
T
2026-04-30 19:19:19 +07:00

19 lines
407 B
Go

//go:build !darwin
package system
import "github.com/jaypipes/ghw"
// GetChassisInfo retrieves hardware information including machine model type and vendor from the system profiler.
func GetChassisInfo() (*ChassisInfo, error) {
chassis, err := ghw.Chassis()
if err != nil {
return nil, err
}
info := &ChassisInfo{
Type: chassis.TypeDescription,
Vendor: chassis.Vendor,
}
return info, nil
}