Migrating from #dep to #go 1.11 modules
▻https://hackernoon.com/migrating-from-dep-to-go-1-11-modules-bba03c513799?source=rss----3a8144e
TL;DRmove your code outside of GOPATHgo mod init [module path]: this will import dependencies from Gopkg.lock.go mod tidy: this will remove unnecessary imports, and add indirect ones.rm -fr vendor/go build: is everthing ok?rm -f Gopkg.lock Gopkg.tomlgit commit -m ’chore(dep): migrated from dep to Go 1.11 modules’IntroductionBefore Go 1.11, dependency management was left to the community. There was many solutions, but my favorite was dep.Like many dependency management tools from other languages, dep has a file for dependencies requests (Gopkg.toml), a file to lock the exact versions used (Gopkg.lock), and a vendor directory to hold the dependency files. A simple command dep ensure is doing all the work.Also, before Go 1.11, you project source needed to be inside your GOPATH and you (...)