In the past, according to an official tutorial (now removed), all Go source code, including those of projects and those of dependencies, should be placed under $GOPATH/src/
.
The convention for newer Go versions is to use go.mod
and perhaps alongside with go.work
.