Video description
Almost all modern software projects use third-party dependencies to do their job. From version control systems and simple string manipulation to powerful data storage and manipulation, the vast majority of teams can't get their work done without help from outside packages. Often, these packages come from open source as well.
In Go, dependencies are called "packages" or "modules". Packages are the smallest unit of grouped Go code, and modules are the modern unit of package distribution. Both packages and modules have a URL naming scheme - similar, but distinctly different from the Java naming scheme for Jars. In the modern Go ecosystem, there are several methods by which you can fetch packages and modules and include them in your project. In this section we'll look at what both packages and modules are, how to find them and how to include them in your project, and then move onto advanced topics like managing private code, storing your dependencies onsite (instead of in a public, hosted environment), and improving build determinism and speed.
You'll learn how to get started with packages and modules, several methods to manage either dependency type, convert your existing project to modules, and how to manage your dependencies for the duration of your project, no matter how long.
* The Go dependency management ecosystem has evolved significantly in the history of the language. Modules, however, are the de-facto standard and are built into the official Go CLI tooling. If you're starting a new project, I highly recommend using modules, and if you're using another technology for dependencies, I recommend researching whether you can switch to modules. This section covers both scenarios
Table of contents
Product information
- Title: Managing Dependencies in Go
- Author(s):
- Release date: May 2020
- Publisher(s): Aaron Schlesinger
- ISBN: None
You might also like
video
Building and leveraging REST APIs with Go
This chapter details the process of writing REST APIs with Go. This chapter starts with basics …
video
Concurrency Exercises in Go
As Moore’s law reaches its limit, CPUs are no longer getting much faster. Instead, they are …
article
Use Github Copilot for Prompt Engineering
Using GitHub Copilot can feel like magic. The tool automatically fills out entire blocks of code--but …
video
Using Interfaces and Mocks in Go
A reliable and comprehensive test suite for your applications isn’t a luxury anymore—it’s a requirement. This …