Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 955 Bytes

README.md

File metadata and controls

50 lines (32 loc) · 955 Bytes

Table of contents

Whatmac

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.

Why?

  • I initially made this library for fun.
  • Allows getting macOS version in an easy way, without having to call an external command.

Getting started

  • To get started download the module into your repository

$ go get github.com/diegomagdaleno/whatmac

  • You are ready to Go!

Example

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.

License

MIT