osutil

package
v0.0.0-...-fd57926 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Windows = "windows"
	MacOS   = "darwin"
	Linux   = "linux"
)

OS type constants

Variables

This section is empty.

Functions

func GetArchitecture

func GetArchitecture() string

GetArchitecture returns the system architecture (amd64, arm64, etc.)

func GetNumCPU

func GetNumCPU() int

GetNumCPU returns the number of logical CPUs on the system

func GetOSType

func GetOSType() string

GetOSType returns the current operating system type

func GetWSLVersion

func GetWSLVersion() string

GetWSLVersion attempts to determine the specific WSL version

func IsContainerized

func IsContainerized() bool

IsContainerized attempts to detect if running in a container environment

func IsDevEnvironment

func IsDevEnvironment() bool

IsDevEnvironment checks if the application is running in a development environment based on environment variables

func IsLinux

func IsLinux() bool

IsLinux returns true if running on Linux

func IsMacOS

func IsMacOS() bool

IsMacOS returns true if running on macOS (Darwin)

func IsRunningInWSL

func IsRunningInWSL() bool

IsRunningInWSL checks if the current Linux environment is specifically running under Windows WSL

func IsUnix

func IsUnix() bool

IsUnix returns true if running on a Unix-like system (macOS, Linux, BSD, etc.)

func IsWSL

func IsWSL() bool

IsWSL checks if the current environment is Windows Subsystem for Linux (WSL)

func IsWindows

func IsWindows() bool

IsWindows returns true if running on Windows

Types

This section is empty.

Jump to

Keyboard shortcuts

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