O'Reilly logo

Level Up Your Web Apps With Go by Mal Curtis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10Packaging and Production

In this last chapter we’ll look at two distinct items. First, we’re going to check out how you can make reusable packages to share between projects, or even modularize your code within a single project. Then we’ll look at how to get your code into production, and the various methods for dependency management that the Go community uses.

Creating Packages

So far we’ve created all our code in the main package, and only consumed other packages. Eventually you’re likely to want to split code that fits together as a logical module into its own package. Having code in a separate package means that you can encapsulate all the logic into a single area, as well as hide a lot of the internal workings from other packages, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required