Go Development and Execution Environment: Difference between revisions
Jump to navigation
Jump to search
(→GOPATH) |
|||
Line 6: | Line 6: | ||
=Environment Variables= | =Environment Variables= | ||
{{External|https://pkg.go.dev/cmd/go#hdr-Environment_variables}} | |||
==<tt>GOPATH</tt>== | ==<tt>GOPATH</tt>== | ||
<FONT COLOR=DARKKHAKI>The <code>GOPATH</code> environment variable defines the [[Go_Language_Modularization#Workspaces|workspace]] directory. Go tools assume that your code is under the path designated by <code>GOPATH</code>. Used to search for packages during compilation, when packages are being [[Go_Language_Modularization#Importing_Packages|imported]].</font> | <FONT COLOR=DARKKHAKI>The <code>GOPATH</code> environment variable defines the [[Go_Language_Modularization#Workspaces|workspace]] directory. Go tools assume that your code is under the path designated by <code>GOPATH</code>. Used to search for packages during compilation, when packages are being [[Go_Language_Modularization#Importing_Packages|imported]].</font> |
Revision as of 19:47, 7 September 2023
Internal
Overview
The go Tool
go
is a tool used to manage source code. More details:
Environment Variables
GOPATH
The GOPATH
environment variable defines the workspace directory. Go tools assume that your code is under the path designated by GOPATH
. Used to search for packages during compilation, when packages are being imported.
To display the value, as seen by the Go runtime, execute:
go env GOPATH
For documentation on GOPATH
, execute:
go help gopath
GOROOT
Used to search for packages during compilation, when packages are being imported. To display the value, as seen by the Go runtime, execute:
go env GOROOT
Compilation
Execution
TODO
Deplete, merge and delete Go Concepts - Runtime