Go Development and Execution Environment: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:
<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>.
==<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>


=Compilation=
=Compilation=

Revision as of 01:15, 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.

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