mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-09 04:52:35 +02:00
fix system info metric crash on error
This commit is contained in:
parent
5b1d45a8fe
commit
7047d37f70
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue