-e flag prints the current Go environment: the active version, all GO* environment variables, the relevant PATH entries, and the status of each symlink in the workspace.
Syntax
Example
What it does
Print all GO* environment variables
igo scans the current process environment and prints every variable whose name starts with
GO (e.g. GOBIN, GOPATH, GOROOT, GOMODCACHE, GOOS, GOARCH), sorted alphabetically.Set any missing Go env vars
If any of
GOBIN, GOPATH, GOROOT, or GOMODCACHE are not set in the environment, igo sets them for the current process using the expected workspace paths:| Variable | Value |
|---|---|
GOBIN | ~/go/bin |
GOPATH | ~/go/path |
GOROOT | ~/go/root |
GOMODCACHE | ~/go/versions/<active version>/pkg/mod |
Print PATH entries relevant to Go
igo checks
PATH for the ~/go/shims and ~/go/bin directories and prints any Go-related entries. Stale entries pointing at versions other than the currently active one are excluded from the output.