gopsutil
gopsutil copied to clipboard
Support for getting disk serial number on darwin
Is your feature request related to a problem? Please describe.
There seems to be no implementation of disk.GetDiskSerialNumber for darwin/windows.
Additional context Is there any other cross platform method in gopsutil to get disk serial number information ?
Indeed this function is only implemented for linux. Implementing this is platform-dependent.
For darwin, we could shell out to system_profiler -detailLevel basic SPSerialATADataType (parse its xml with -xml flag).
For windows, see #435.