Go lang 은 언어 자체에서 모듈 관리를 한다. 따라서 GOROOT 경로 안에서 코드를 작성해야 새로운 모듈을 추가할 수 있고 Go lang이 해당 코드, 모듈의 위치를 알 수 있다. 하지만 Go Modules를 추가하면 GOROOT 경로 외에서도 모듈을 import 할 수 있다.
Go Modules
go mod init creates a new module, initializing the go.mod file that describes it.
go build, go test, and other package-building commands add new dependencies to go.mod as needed.
go list -m all prints the current module’s dependencies.
go get changes the required version of a dependency (or adds a new dependency).