Go Development and Execution Environment: Difference between revisions
Jump to navigation
Jump to search
(→GOROOT) |
(→GOPATH) |
||
Line 12: | Line 12: | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
go env GOPATH | go env GOPATH | ||
</syntaxhighlight> | |||
For documentation on GOPATH, execute: | |||
<syntaxhighlight lang='bash'> | |||
go help gopath | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 19:04, 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