From 611482834f1b6d01ca32ec090eb5bef6947748cc Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Wed, 5 Feb 2025 21:05:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DCPU=E4=B8=89=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=A0=BC=E5=BC=8F=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/cpu.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/cpu.go b/system/cpu.go index 3ba7d2a..931b30b 100644 --- a/system/cpu.go +++ b/system/cpu.go @@ -143,13 +143,13 @@ func getCpuInfoFromLscpu(ret *model.SystemInfo) { case strings.Contains(fields[0], "CPU dynamic MHz") && !hasFrequency(ret.CpuModel): ret.CpuModel += " @ " + value + " dynamic MHz" case strings.Contains(fields[0], "L1d cache") || strings.Contains(fields[0], "L1d"): - L1dcache = value + L1dcache = strings.Split(value, " ")[0] case strings.Contains(fields[0], "L1i cache") || strings.Contains(fields[0], "L1i"): - L1icache = value + L1icache = strings.Split(value, " ")[0] case strings.Contains(fields[0], "L2 cache") || strings.Contains(fields[0], "L2"): - L2cache = value + L2cache = strings.Split(value, " ")[0] case strings.Contains(fields[0], "L3 cache") || strings.Contains(fields[0], "L3"): - L3cache = value + L3cache = strings.Split(value, " ")[0] } } // 在实在找不到型号的时候,直接输出CPU制造的厂商