RuntimeDetector

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: Unlicense Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetRuntime

func SetRuntime(os OperatingSystem)

SetRuntime sets the runtime environment to the specified operating system.

Types

type OperatingSystem

type OperatingSystem string

OperatingSystem type defines the supported operating systems.

const (
	Unknown OperatingSystem = "unknown"
	Windows OperatingSystem = "windows"
	Linux   OperatingSystem = "linux"
	MacOS   OperatingSystem = "darwin"
)

func DetectOS

func DetectOS() OperatingSystem

DetectOS detects and returns the current operating system.

func GetCurrentOS

func GetCurrentOS() OperatingSystem

GetCurrentOS returns the currently set operating system or detects it if not set.

Jump to

Keyboard shortcuts

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