Package layout:
https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1
Create a new module:
go mod init url
Add a new dependency:
go get github.com/foo/bar@v1.2.3
@latest, @8e1b8d3 also work.
Remove uneeded dependencies and add needed:
go mod tidy
Update dependencies:
go get -d -u ./...
and clean out the old ones...
go mod tidy
List dependencies:
go list -m all
Reason for a dependency:
$ go mod why -m golang.org/x/sys
golang.org/x/sys
github.com/alexedwards/argon2id
golang.org/x/crypto/argon2
golang.org/x/sys/cpu
Verify all your locally cached dependencies:
go mod verify
Clean out local module cache:
go clean -modcache
This will delete caches dependencies for ALL PROJECTS! Shouldn't be an issue if
they have their dependencies tracked properly.
Local Override:
replace github.com/portainer/liblicense/v3 => /home/kota/src/portainer/liblicense