Skip to content

Commit

Permalink
fix: trim spaces in cpu manufacturer
Browse files Browse the repository at this point in the history
  • Loading branch information
iglov committed Oct 2, 2024
1 parent a484f0b commit 8fe92be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/dmidecode/cpu.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dmidecode

import (
"strings"
"github.com/yumaojun03/dmidecode"
)

Expand Down Expand Up @@ -30,7 +31,7 @@ func GetCPUInfo() ([]CPUInfo, error) {
var cpus []CPUInfo
for _, cpu := range cpuInfo {
cpus = append(cpus, CPUInfo{
Manufacturer: cpu.Manufacturer,
Manufacturer: strings.Trim(cpu.Manufacturer, " "),
SocketDesignation: cpu.SocketDesignation,
Version: cpu.Version,
CoreCount: cpu.CoreCount,
Expand Down

0 comments on commit 8fe92be

Please sign in to comment.