Skip to content

Commit cffd0d4

Browse files
authored
fix readme example code to print instruction cache instead of data cache for the second time, also remove unecessary fmt.Sprintf (#91)
1 parent e637168 commit cffd0d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ func main() {
3939
fmt.Println("ThreadsPerCore:", CPU.ThreadsPerCore)
4040
fmt.Println("LogicalCores:", CPU.LogicalCores)
4141
fmt.Println("Family", CPU.Family, "Model:", CPU.Model, "Vendor ID:", CPU.VendorID)
42-
fmt.Println("Features:", fmt.Sprintf(strings.Join(CPU.FeatureSet(), ",")))
42+
fmt.Println("Features:", strings.Join(CPU.FeatureSet(), ","))
4343
fmt.Println("Cacheline bytes:", CPU.CacheLine)
4444
fmt.Println("L1 Data Cache:", CPU.Cache.L1D, "bytes")
45-
fmt.Println("L1 Instruction Cache:", CPU.Cache.L1D, "bytes")
45+
fmt.Println("L1 Instruction Cache:", CPU.Cache.L1I, "bytes")
4646
fmt.Println("L2 Cache:", CPU.Cache.L2, "bytes")
4747
fmt.Println("L3 Cache:", CPU.Cache.L3, "bytes")
4848
fmt.Println("Frequency", CPU.Hz, "hz")

0 commit comments

Comments
 (0)