Skip to content

DiegoMagdaleno/whatmac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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