Skip to content

Commit 748351e

Browse files
committed
fix: trim spaces in cpu manufacturer
1 parent a484f0b commit 748351e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/dmidecode/cpu.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package dmidecode
22

33
import (
44
"github.com/yumaojun03/dmidecode"
5+
"strings"
56
)
67

78
// CPUInfo holds the details of a CPU.
@@ -30,7 +31,7 @@ func GetCPUInfo() ([]CPUInfo, error) {
3031
var cpus []CPUInfo
3132
for _, cpu := range cpuInfo {
3233
cpus = append(cpus, CPUInfo{
33-
Manufacturer: cpu.Manufacturer,
34+
Manufacturer: strings.Trim(cpu.Manufacturer, " "),
3435
SocketDesignation: cpu.SocketDesignation,
3536
Version: cpu.Version,
3637
CoreCount: cpu.CoreCount,

0 commit comments

Comments
 (0)