go env

go env [-json] [-u] [-w] [var ...]

Env prints Go environment information.

  • json Prints the environment in JSON format instead of as a shell script.
  • w write Changes the settings of the named env variables to the given value
  • u unset Unsets the default setting for the named environment variables