Skip to content

Commit ee0aed9

Browse files
authored
Merge pull request #441 from kuro5989/topic/zzc/colon
Fix: correctly parse /proc/cpuinfo values containing colon (:)
2 parents 2677d30 + cee2117 commit ee0aed9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cpu/cpu_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func logicalProcessorsFromProcCPUInfo(
375375
lpAttrs = map[string]string{}
376376
continue
377377
}
378-
parts := strings.Split(line, ":")
378+
parts := strings.SplitN(line, ":", 2)
379379
key := strings.TrimSpace(parts[0])
380380
value := strings.TrimSpace(parts[1])
381381
lpAttrs[key] = value

0 commit comments

Comments
 (0)