Please refer to this blog post https://blog.golang.org/using-go-modules to 
get to know why go modules are better than using GOPATH (primarly for not 
messing with the import paths).

You are free to setup a local repository (localhost) by issuing the 
following commands in your project directory outside the GOPATH:
`go mod init localhost.repository` (not matching an existing domain.tld; 
creates a go.mod file)
`go mod tidy` (maintains and cleans up dependencies)

Now `go get -u` downloads and upgrades packages appropriately.
ohir schrieb am Mittwoch, 17. Februar 2021 um 13:47:58 UTC+1:

> Dnia 2021-02-16, o godz. 13:57:06
> Peter Kleiweg <pkle...@xs4all.nl> napisaƂ(a):
>
> > So why would you ever want to *not* set `GO111MODULE=auto` ?
> > 
>
> Because GOPATH mode is gonna to be slayed soon.
> It is better to use it less and less to avoid future disruption.
>
> Hope this helps,
>
> -- 
> Wojciech S. Czarnecki
> << ^oo^ >> OHIR-RIPE
>

-- 
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/253715c5-d5da-4c61-84b4-d860ad0fe4c5n%40googlegroups.com.

Reply via email to