Help us shape the future of Go! Take the 2026 Go Developer Survey

env

package
v1.20.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentAbsolutePath

func CurrentAbsolutePath() string

func Is64Bit

func Is64Bit() bool

Is64Bit returns whether the current CPU architecture is 64-bit. Is64Bit 返回当前 CPU 架构是否为 64 位。

func IsAir

func IsAir() bool

IsAir checks if the application is running using Air.

func IsArm

func IsArm() bool

IsArm returns whether the current CPU architecture is ARM. IsArm 返回当前 CPU 架构是否为 ARM。

func IsArtisan

func IsArtisan() bool

func IsBootstrapSetup

func IsBootstrapSetup() bool

func IsDarwin

func IsDarwin() bool

IsDarwin returns whether the current operating system is Darwin. IsDarwin 返回当前操作系统是否为 Darwin。

func IsDirectlyRun

func IsDirectlyRun() bool

IsDirectlyRun checks if the application is running using go run .

func IsGithub

func IsGithub() bool

IsGithub returns whether the current environment is github action. IsGithub 返回当前系统环境是否为 github action。

func IsLinux

func IsLinux() bool

IsLinux returns whether the current operating system is Linux. IsLinux 返回当前操作系统是否为 Linux。

func IsNoANSI

func IsNoANSI() bool

IsNoANSI checks if the application is running with the --no-ansi flag.

func IsTesting

func IsTesting() bool

IsTesting checks if the application is running in testing mode.

func IsWindows

func IsWindows() bool

IsWindows returns whether the current operating system is Windows. IsWindows 返回当前操作系统是否为 Windows。

func IsX86

func IsX86() bool

IsX86 returns whether the current CPU architecture is X86. IsX86 返回当前 CPU 架构是否为 X86。

func MainPath

func MainPath() string

MainPath returns the package name of application, eg: goravel.

Types

This section is empty.

Jump to

Keyboard shortcuts

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