Simple project with go module
- go mod init -> creates a new module and create the go.mod file that describes it
- go list -m all -> prints all the current module’s dependencies
- go get -> adds a new dependency or changes the required version of a dependency
- go mod tidy -> removes unused dependencies
Create new module.
go mod init github.com/isirfanm/module-test
Add dependency to module.
go get github.com/elliotforbes/test-package
Change version of adependency.
go get github.com/elliotforbes/[email protected]
Remove unused dependencies.
go mod tidy