Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
codemodify committed Feb 17, 2020
1 parent bf59897 commit 78261a0
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
# SystemKit Platform Detection at Runtime
# Detailed Platform Detection at Runtime
[![GoDoc](https://godoc.org/github.com/codemodify/SystemKit?status.svg)](https://godoc.org/github.com/codemodify/systemkit-platform)
[![0-License](https://img.shields.io/badge/license-0--license-brightgreen)](https://github.com/codemodify/TheFreeLicense)
[![Go Report Card](https://goreportcard.com/badge/github.com/codemodify/SystemKit)](https://goreportcard.com/report/github.com/codemodify/SystemKit)
[![Test Status](https://github.com/danawoodman/systemservice/workflows/Test/badge.svg)](https://github.com/danawoodman/systemservice/actions)
![code size](https://img.shields.io/github/languages/code-size/codemodify/SystemKit?style=flat-square)

# Usages
- Intented use is as a library in Go code
```go
packlage main

import platform "github.com/codemodify/systemkit-platform"

func main() {

fmt.Println(platform.GetInfo().CPU.Architecture) // => ex: arm OR amd64
fmt.Println(platform.GetInfo().CPU.Variant.Name) // => ex: armv5 OR armv6 OR armv8, etc
fmt.Println(platform.GetInfo().CPU.Variant.Detailed) // => ex: armv5te

}
```

-

# References
- `go tool dist list`
- https://github.com/golang/go/blob/master/src/go/build/syslist.go
Expand Down

0 comments on commit 78261a0

Please sign in to comment.