Re: [go-nuts] Re: Home directory?

2023-04-23 Thread Amnon
Ok Jan, you are right. They do still play a part under the hood.
So external modules get cached under $GOMODCACHE which is $GOPATH/pkg/mod 
by default
and go install installs executables under $GOBIN which is $GOPATH/bin by 
default.

But my point is that (apart from $GOBIN), this is something that the 
end-user no longer needs to bother themselves with.
Unlike the earliest go versions, you no longer need to set GOPATH in order 
to compile your code.
And you no longer need to insert your code into a directory tree under 
GOPATH. 

On Sunday, 23 April 2023 at 09:49:40 UTC+1 Jan Mercl wrote:

> On Sun, Apr 23, 2023 at 10:28 AM Amnon  wrote:
>
> > Yes GOPATH and GOROOT have been deprecated.
>
> Both are alive and well. They are essential for the build system/go
> command to work as required.
>
> tl;dr: There's a default value of GOPATH so one does not have to set
> it. A much longer version can be obtained by '$ go help gopath'.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/de5284b3-2a85-4870-9229-51db75f062ffn%40googlegroups.com.


Re: [go-nuts] Re: Home directory?

2023-04-23 Thread Jan Mercl
On Sun, Apr 23, 2023 at 10:28 AM Amnon  wrote:

> Yes GOPATH and GOROOT have been deprecated.

Both are alive and well. They are essential for the build system/go
command to work as required.

tl;dr: There's a default value of GOPATH so one does not have to set
it. A much longer version can be obtained by '$ go help gopath'.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-V%2BR6o9XNN%3DXwoOt3t6WABe0ch69Pc3%2BV-S8QPW7dGRoQ%40mail.gmail.com.


[go-nuts] Re: Home directory?

2023-04-23 Thread Amnon
I looked at https://go.dev/doc/tutorial/create-module 
it only has two mentions of, which are just suggestions regarding where to 
create your working directory.
But it is just a suggestion, and you can choose any location which is 
convenient for you. 

Yes GOPATH and GOROOT have been deprecated. Any tutorials which tell you to 
put your code under $GOPATH are ancient history
and should be ignored. 

On Sunday, 23 April 2023 at 09:16:59 UTC+1 joseph.p...@gmail.com wrote:

> In the ‘Create a Go Module’ documentation, it keeps referencing ‘home 
> directory’ and uses the unix command ‘cd’.
>
> Do they literally mean my unix home directory or do they mean my GOPATH 
> directory?
>
> Have GOPATH and GOROOT been deprecated?
>
> Thanks,
>
> Hoe
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ac730909-ba56-49d9-86a7-a743d5a801f5n%40googlegroups.com.