Go Tool: Difference between revisions
Jump to navigation
Jump to search
(→build) |
|||
Line 1: | Line 1: | ||
=Internal= | =Internal= | ||
* [[Go_Development_and_Execution_Environment#The_go_Tool|Go Development and Execution Environment]] | * [[Go_Development_and_Execution_Environment#The_go_Tool|Go Development and Execution Environment]] | ||
=Commands= | =Commands= | ||
==<tt>build</tt>== | ==<tt>build</tt>== |
Revision as of 01:25, 15 August 2023
Internal
Commands
build
The build
command compiles and builds an executable.
cd ${PROJECT_DIR}
go build ./src/main/main.go
The command will create an executable named main
and place it by default in the ${PROJECT_DIR}
directory.
doc
The doc
command prints documentation for a package.
run
cd $PROJECT_DIR
go run ./src/main/main.go