mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-17 01:45:27 +02:00
Including system metadata when posting to utility API
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
//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
|
||||
}
|
||||
Reference in New Issue
Block a user