go-env(1)

go-env1

Print go environment information

Usage

go env [var ...]

Overview

Env prints Go environment information.

By default env prints information as a shell script (on Windows, a batch file). If one or more variable names is given as arguments, env prints the value of each named variable on its own line.

-json

prints the environment in JSON format instead of as a shell script.

-u

requires one or more arguments and unsets the default setting for the named environment variables, if one has been set with ‘go env -w’.

-w

requires one or more arguments of the form NAME=VALUE and changes the default settings of the named environment variables to the given values.

For more about environment variables, see ‘go help environment’.

Releases

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–11
  2. 12–13

-json since Debian 12 (Bookworm); -u since Debian 12 (Bookworm); -w since Debian 12 (Bookworm).

Author

This manual page was written by Michael Stapelberg <[email protected]> and is maintained by the Debian Go Compiler Team <[email protected]> based on the output of ‘go help env’ for the Debian project (and may be used by others).

From gccgo-go 2:1.24~2 in Debian 13 (Trixie). Also shipped by golang-go. Parsed by carta from the page's man source.