:: Re: [DNG] golang-1.7 considered def…
Página Principal
Delete this message
Reply to this message
Autor: Hendrik Boom
Data:  
Para: dng
Assunto: Re: [DNG] golang-1.7 considered defective as is.
On Sat, Aug 19, 2017 at 08:52:13AM +0100, KatolaZ wrote:
> On Fri, Aug 18, 2017 at 10:30:01PM -0400, Hendrik Boom wrote:
>
> [cut]
>
> >
> > Just to me some time -- what settings are you using for critical
> > environment variables like GOPATH and GOROOT?
>
> GOROOT should be the folder where go is installed.
>
> GOPATH is the workspace where you keep your go sources. In general,
> you can have more than one workspace, so you might want to set GOPATH
> dynamically.


I see. go itself knows where it is and sets its own versino of the
environment variables:

/usr/lib/go-1.7/bin/go env
GOARCH="386"
GOBIN=""
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/go-1.7"
GOTOOLDIR="/usr/lib/go-1.7/pkg/tool/linux_386"
CC="gcc"
GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build708617863=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

But Linux's regular environment is untouched.

I suppose I have to make PATH include /usr/lib/go-1.7/bin so the go
command will work.
.
GOROOT would be /usr/lib/go-1.7 although go seems to already have
that built in, and I'll have to set GOPATH to where I want to work
(likely ~hendrik/dv/go).

Thanks.