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...
- Host: GitHub
- URL: https://github.com/wille/osutil
- Owner: wille
- License: mit
- Created: 2017-02-01T15:10:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-29T07:58:35.000Z (9 months ago)
- Last Synced: 2025-01-20T17:13:23.519Z (3 months ago)
- Topics: bsd, dragonfly, dragonflybsd, freebsd, go, golang, linux, mac, macos, netbsd, openbsd, operating, operatingsystem, os, system, windows
- Language: Go
- Size: 20.5 KB
- Stars: 28
- Watchers: 3
- Forks: 14
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# osutil
[](https://travis-ci.org/wille/osutil)
[](https://godoc.org/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()
```