Go env: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:


=Overview=
=Overview=
The <code>env</code> command prints the effective values of the [[Go_Environment_Variables|environment variables]] relevant to the tool chain.
The <code>env</code> command prints the effective values of the [[Go_Environment_Variables#Overview|environment variables]] relevant to the tool chain.
<syntaxhighlight lang='bash'>
<syntaxhighlight lang='bash'>
go env GOOS GOARCH GOPATH
go env GOOS GOARCH GOPATH
</syntaxhighlight>
</syntaxhighlight>
Also see: {{Internal|Go_Environment_Variables#Overview|Go Environment Variables}}
=Options=
=Options=
==<tt>-w</tt>==
==<tt>-w</tt>==
The flag requires one or more <code>NAME=VALUE</code> arguments and changes the default settings for the named environment variables.
The flag requires one or more <code>NAME=VALUE</code> arguments and changes the default settings for the named environment variables.
Also see: {{Internal|Go_Environment_Variables#Overview|Go Environment Variables}}

Latest revision as of 02:10, 21 February 2024

Internal

Overview

The env command prints the effective values of the environment variables relevant to the tool chain.

go env GOOS GOARCH GOPATH

Also see:

Go Environment Variables

Options

-w

The flag requires one or more NAME=VALUE arguments and changes the default settings for the named environment variables.

Also see:

Go Environment Variables