env

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 8 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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