Go Development and Execution Environment: Difference between revisions
Jump to navigation
Jump to search
(→GOROOT) |
(→GOPATH) |
||
Line 4: | Line 4: | ||
=Environment Variables= | =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>. | <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> | ||
==<tt>GOROOT</tt>== | ==<tt>GOROOT</tt>== | ||
<font color=darkkhaki>Used to search for packages during compilation, when packages are being [[Go_Language_Modularization#Importing_Packages|imported]].</font> | <font color=darkkhaki>Used to search for packages during compilation, when packages are being [[Go_Language_Modularization#Importing_Packages|imported]].</font> |
Revision as of 01:16, 15 August 2023
Internal
Overview
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.
GOROOT
Used to search for packages during compilation, when packages are being imported.
Compilation
Execution
cd $PROJECT_DIR
go run ./src/main/main.go
TODO
Deplete, merge and delete Go Concepts - Runtime