readme: add more info to readme
diff --git a/README.md b/README.md
index db9a4b3..399657a 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
The `go-m1cpu` module is a library for inspecting Apple Silicon CPUs in Go.
-Use the `m1cpu` library for looking up the CPU frequency for Apple M1 and M2 CPUs.
+Use the `m1cpu` Go package for looking up the CPU frequency for Apple M1 and M2 CPUs.
# Install
@@ -14,8 +14,17 @@
go get github.com/shoenig/go-m1cpu@latest
```
+# CGO
+
+This package requires the use of [CGO](https://go.dev/blog/cgo).
+
+Extracting the CPU properties is done via Apple's [IOKit](https://developer.apple.com/documentation/iokit?language=objc)
+framework, which is accessible only through system C libraries.
+
# Example
+Simple Go program to print Apple Silicon M1/M2 CPU speeds.
+
```go
package main
@@ -36,10 +45,21 @@
}
```
-# CGO
+Using `go test` to print out available information.
-This package requires the use of CGO. Extracting the CPU properties is done via
-Apple's IOKit framework, which is accessible only through system C libraries.
+```
+➜ go test -v -run Show
+=== RUN Test_Show
+ cpu_test.go:42: pCore Hz 3504000000
+ cpu_test.go:43: eCore Hz 2424000000
+ cpu_test.go:44: pCore GHz 3.504
+ cpu_test.go:45: eCore GHz 2.424
+ cpu_test.go:46: pCore count 8
+ cpu_test.go:47: eCoreCount 4
+ cpu_test.go:50: pCore Caches 196608 131072 16777216
+ cpu_test.go:53: eCore Caches 131072 65536 4194304
+--- PASS: Test_Show (0.00s)
+```
# License