env

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDate

func BuildDate() string

BuildDate returns build date of the `xgo` command.

func HOME

func HOME() string

func Installed

func Installed() bool

Installed checks is `xgo` installed or not. If returns false, it means `xgo` is not installed or not in PATH.

func MainVersion

func MainVersion() string

MainVersion extracts the major.minor version from the current version. For example, "v1.5.3" returns "1.5", "v1.5.0-rc1" returns "1.5". For development versions like "(devel)" or pseudo-versions, returns "0.0".

func Version

func Version() string

Version returns the XGo tree's version string. It is either the commit hash and date at the time of the build or, when possible, a release tag like "v1.0.0-rc1".

Version detection priority: 1. buildVersion from ldflags (for official releases via goreleaser) 2. debug.ReadBuildInfo() - reads embedded Go module version from VCS 3. "(devel)" for non-VCS builds

func XGOROOT

func XGOROOT() string

XGOROOT returns the root of the XGo tree. It uses the XGOROOT environment variable, if set at process start, or else the root used during the XGo build.

Types

This section is empty.

Jump to

Keyboard shortcuts

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