PERSONAL BLOG
Posts for GoLang Category
What is GOPATH and GOROOT in GoLang

What is GOPATH and GOROOT in GoLang

Go tools expect a certain layout of the source code. GOROOT and GOPATH are environment variables that define this layout. These two are the most essential PATHs in GoLang. The go tool uses it to do the task in a better way. Now, we are going to take a look at what each one represents.

• GOPATH in Go Programming
• GOROOT in GoLang
• Modifying GOPATH and GOROOT

GOPATH in Go Programming

GOPATH is a variable that defines the root of your workspace. By default, the workspace directory is a directory that is named go within your...