macos

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package macos contains utilities for checking macOS system capabilities.

https://en.wikipedia.org/wiki/MacOS

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLTInstalled added in v0.2.0

func CLTInstalled(ctx context.Context) (bool, error)

CLTInstalled reports whether the XCode Command Line Tools are installed.

Types

type Version

type Version int

Version represents a macOS version.

The macOS release is represented by the version of the darwin kernel it shipped with.

const (
	Unknown      Version = iota - 1 // Unknown version
	Jaguar       Version = iota + 5 // Mac OS X Jaguar
	Panther                         // Mac OS X Panther
	Tiger                           // Mac OS X Tiger
	Leopard                         // Mac OS X Leopard
	SnowLeopard                     // Mac OS X Snow Leopard
	Lion                            // Mac OS X Lion
	MountainLion                    // OS X Mountain Lion
	Mavericks                       // OS X Mavericks
	Yosemite                        // OS X Yosemite
	ElCapitan                       // OS X El Capitan
	Sierra                          // macOS Sierra
	HighSierra                      // macOS High Sierra
	Mojave                          // macOS Mojave
	Catalina                        // macOS Catalina
	BigSur                          // macOS Big Sur
	Monterey                        // macOS Monterey
	Ventura                         // macOS Ventura
	Sonoma                          // macOS Sonoma

)

Known macOS versions.

Source: https://en.wikipedia.org/wiki/Template:MacOS_versions

func (Version) CLTInstalledVersion added in v0.2.0

func (v Version) CLTInstalledVersion(ctx context.Context) (bool, error)

CLTInstalled reports whether the XCode Command Line Tools are installed.

func (Version) Darwin added in v0.2.0

func (v Version) Darwin() int

Darwin returns the darwin kernel version.

func (Version) FullName added in v0.2.0

func (v Version) FullName() string

FullName produces the full name of the version.

func (Version) Name

func (v Version) Name() string

Name produces the short name of the version.

func (Version) OSVersion added in v0.2.0

func (v Version) OSVersion() string

OSVersion produces the OS version.

func (Version) Supports32Bit

func (v Version) Supports32Bit() bool

Supports32Bit reports whether the version supports 32-bit applications.

func (Version) Supports64Bit

func (v Version) Supports64Bit() bool

Supports64Bit reports whether the version supports 64-bit applications.

func (Version) SupportsARM

func (v Version) SupportsARM() bool

SupportsARM reports whether the version supports ARM applications.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL