Library written in Golang to dump information about a macOS operating system at runtime, such as version is running on, codename of the operating system, etc.
- I initially made this library for fun.
- Allows getting macOS version in an easy way, without having to call an external command.
- To get started download the module into your repository
$ go get github.com/diegomagdaleno/whatmac
- You are ready to Go!
package main
import (
"fmt"
"github.com/diegomagdaleno/whatmac"
)
func main() {
fmt.Println(whatmac.GetProductVersionAsFloat())
}
This in my case returns 10.16
that can be used for comparing.
MIT