An open API service indexing awesome lists of open source software.

https://github.com/wille/osutil

Go library to easily detect current operating system, current Linux distribution, macOS version and more...
https://github.com/wille/osutil

bsd dragonfly dragonflybsd freebsd go golang linux mac macos netbsd openbsd operating operatingsystem os system windows

Last synced: 3 months ago
JSON representation

Go library to easily detect current operating system, current Linux distribution, macOS version and more...

Awesome Lists containing this project

README

        

# osutil

[![Travis](https://img.shields.io/travis/wille/osutil/master.svg)](https://travis-ci.org/wille/osutil)
[![GoDoc](https://godoc.org/github.com/wille/osutil?status.svg)](https://godoc.org/github.com/wille/osutil)
[![Go Report Card](https://goreportcard.com/badge/github.com/wille/osutil)](https://goreportcard.com/report/github.com/wille/osutil)

Go library to detect operating system version

## Usage

```go
import "github.com/wille/osutil"

// macOS, Windows, Linux, FreeBSD...
osutil.Name

// macOS: 10.17, 10.16...
// Windows: 10, 8.1, Vista...
//
osutil.GetVersion()

// Returns nicely formatted string
// Windows 10, macOS 10.17 Sierra
osutil.GetDisplay()
```