From the course: Programming with Go Modules
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Splitting a project into multiple modules - Go Tutorial
From the course: Programming with Go Modules
Splitting a project into multiple modules
- [Instructor] As your project grows in feature and complexity, you may want to group packages into separate and independent modules. This would allow for better usability and compositability of your modules. For instance, in our example, we're going to split our existing module. We're going to have a module called emoserv, which is the existing program that we've developed. But now we're going to introduce a new module called emojiis for emoji I can search. I know, I'm bad with names. Which will provide the search library. This split will allow our library package to be more portable. It will allow other programs to easily import and consume our search functionality. The emoserv program can evolve separately without being tied to couple to our search package, and the search library can evolve and scale its feature independently all the time. Our modules so far are hosted locally on disk. When we split our code into independent modules, the Go tools will need a way to know where each…