mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-11 22:30:47 +01:00
fix system info metric crash on error
This commit is contained in:
@@ -101,7 +101,7 @@ func getSystemInfo(ctx context.Context, lastResult *SystemInfo) (*SystemInfo, er
|
||||
// disk.Warnings has the same type
|
||||
// all Warnings are alias of common.Warnings from "github.com/shirou/gopsutil/v4/internal/common"
|
||||
// see line 37
|
||||
var warnings sensors.Warnings
|
||||
warnings := new(sensors.Warnings)
|
||||
if errors.As(err, &warnings) {
|
||||
for _, warning := range warnings.List {
|
||||
allWarnings.Add(warning)
|
||||
|
||||
Reference in New Issue
Block a user