Skip to content

Commit f698805

Browse files
committed
Improve CPU info readability
1 parent dfdeb47 commit f698805

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

greeter.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ func main() {
4848
}
4949

5050
if len(cores) > 1 {
51-
cpuinfo = fmt.Sprintf("%d x ", len(cores))
51+
cpuinfo = fmt.Sprintf("%d Cores", len(cores))
52+
} else {
53+
cpuinfo = fmt.Sprintf("1 Core", len(cores))
5254
}
5355

54-
cpuinfo += info[0].ModelName
56+
cpuinfo += ": " + info[0].ModelName
5557
} else {
5658
cpuinfo = "Error getting CPU info"
5759
}

0 commit comments

Comments
 (0)