![]() ![]() a).īin/: location of compiled executable programs built by Go.Ĭonsider the following animation where we change the Go SDK from 1.16.1 to 1.16.3 and assign the project GOPATH to the newly-downloaded SDK directory. Pkg/: location of compiled package code (for example. Src/: location of Go source code (for example. GOPATH is the root of your workspace and contains the following folders: You can use another directory as your workspace by configuring GOPATH for different scopes. GOPATH stores your code base and all the files that are necessary for your development. By default, the workspace directory is a directory that is named go within your user home directory ( ~/go for Linux and MacOS, %USERPROFILE%/go for Windows). GOPATH is a variable that defines the root of your workspace. You do not need to change this variable, unless you plan to use different Go versions. GOROOT is a variable that defines where your Go SDK is located. ![]() GOROOT and GOPATH are environment variables that define this layout. Go tools expect a certain layout of the source code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |