Answer the question
In order to leave comments, you need to log in
How to correctly specify the path to GO?
Did according to the manual https://losst.ru/ustanovka-go-ubuntu installation of go was successful, go version says that it costs 1.9
It became unclear from the moment the test file was created
First, let's create a working folder for the sources in the home folder:
mkdir ~/work/src/hello/
$ cd~/work/src/hello/
usr/local/go
so where should I create the folder work/src/hello
? At the root, i.e. on the same level as usr, in local, or in go?Next, we need to tell Go where our project folder is located.
For this, the GOPATH variable is used:
This line can be added to /etc/profile so that we do not need to enter
export GOPATH=$HOME/work/
go install hello
and not go build hello.go
? Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question