refactor: small go 1.26 updates and go fix changes

This commit is contained in:
henrygd
2026-02-19 17:57:06 -05:00
parent 5d8906c9b2
commit 04600d83cc
39 changed files with 9 additions and 46 deletions

View File

@@ -89,10 +89,7 @@ func getPerCoreCpuUsage(cacheTimeMs uint16) (system.Uint8Slice, error) {
lastTimes := lastPerCoreCpuTimes[cacheTimeMs]
// Limit to the number of cores available in both samples
length := len(perCoreTimes)
if len(lastTimes) < length {
length = len(lastTimes)
}
length := min(len(lastTimes), len(perCoreTimes))
usage := make([]uint8, length)
for i := 0; i < length; i++ {