Dependency management

One directory that we haven't mentioned so far is the vendor directory. The vendor directory in a Go project is a special directory. This is where dependency management for your project will be stored. For our book's long sample project, we will be using the dep tool. Concisely, dep is a dependency management tool that will allow you to version pin your dependencies to a project. It works by taking all of the imported packages that were retrieved with go get or git commands directly in your $GOPATH and copies the relevant source code needed by your project into this vendor directory within your project. The tool does this by reading your source code import statements and figuring out which packages you need. To get us ...

Get Echo Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.