Article Directory
Synopsis
There are generally three main folders in the go project directory:
-
bin : The executable files (exe files) generated after compilation are generally stored here.
The bin directory is generally set in environment variables, so it can be called directly.
-
src : Store the developed source code, generally code development is carried out in this directory.
-
pkg : store compiled library files
1. Basic common commands
go build
Compile the go program file to generate a binary executable (exe) file, which can be opened and run directly.
Compile the generated exe executable file
go run
Execute the go file directly, without generating the exe file in the middle.
go install
go install is divided into two steps:
- First compile an executable file (exe file)
- Copy the executable file to the
GOPATH/bin
directory
Other commands
To be perfected~~