When should you use external modules, and why?
In Go development, leveraging external modules is a frequent practice that can benefit your projects. External modules, also known as third-party dependencies, offer many advantages when used judiciously. In this section, we will explore when to use external modules and the compelling reasons behind their adoption.
You should use external modules to do the following:
- Promote code reusability and efficiency
- Expand project functionality
- Offload dependency management
- Enable collaborative development with the open source community
- Utilize proven reliability, community support, and documentation by open source code
However, always exercise caution and select dependencies and modules that align with your project’s goals and long-term sustainability plans.