9

Using Go Modules to Define a Project

Overview

This chapter dives into the use of Go modules for structuring and managing Go projects. We will start by introducing the concept of modules and their significance in organizing code. This chapter will also cover creating your first module while discussing the essential go.mod and go.sum files.

Moreover, we will cover how to use third-party modules as dependencies and offer insights into managing these dependencies effectively. This chapter will provide hands-on experience through exercises and activities that will empower you to develop more structured and manageable Go projects, promoting code reusability and simplifying the development process.

Technical requirements

For this chapter, you'll ...

Get Go Programming - From Beginner to Professional - Second Edition 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.