Skip to content

Commit

Permalink
docs: add examples for Go Docs (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed May 5, 2023
1 parent 76ca6b6 commit 41fe74c
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions examples_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package m1cpu

import (
"fmt"
)

func ExampleIsAppleSilicon() {
value := IsAppleSilicon()
fmt.Println(value)
}

func ExampleModelName() {
value := ModelName()
fmt.Println(value)
}

func ExamplePCoreHz() {
value := PCoreHz()
fmt.Println(value)
}

func ExampleECoreHz() {
value := ECoreHz()
fmt.Println(value)
}

func ExamplePCoreGHz() {
value := PCoreGHz()
fmt.Println(value)
}

func ExampleECoreGHz() {
value := ECoreGHz()
fmt.Println(value)
}

func ExamplePCoreCount() {
value := PCoreCount()
fmt.Println(value)
}

func ExampleECoreCount() {
value := ECoreCount()
fmt.Println(value)
}

func ExamplePCoreCache() {
l1inst, l1data, l2 := PCoreCache()
fmt.Println(l1inst, l1data, l2)
}

func ExampleECoreCache() {
l1inst, l1data, l2 := ECoreCache()
fmt.Println(l1inst, l1data, l2)
}

0 comments on commit 41fe74c

Please sign in to comment.