-
GOROOT => Where go executable resides
-
GOPATH => Where all the package source code will be downloaded bin/ => For executables src/ => For source codes
It can also be used for creating workspace, and there will be following folders.... a. bin/ b. pkg/ c. src/
-
To run a go file go run filename.go
-
To build a go package go build package_name This package folder must present inside the src folder of GOROOT or GOPATH
To build a single file go build filename.go
-
To make the executable as a command use following command go install package_name This package folder must present inside the src folder of GOROOT or GOPATH This command will place the executable inside the bin folder inside workspace
hallosabuj/simple-go-examples
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published