Modular Design Pattern?

Written by
Link to Post

https://www.reddit.com/r/golang/comments/adp7vn/modular_design_pattern/

Hi All,

In a lot of Microsoft languages, there’s this concept of a “solution”, which is made up of a bunch of “projects”, which then has dependencies via a package manager like “nuget”.

If I’m writing something that I want to build in this kind of pattern, what’s the correct idiomatic way to structure the directories and files for this?

Is it c:solutionproject1.go, c:solutionproject2.go …, along with a single c:solutionvendor directory?

or is it: c:solutionproject1main.go, c:solutionproject2main.go

With a vendor directory per project?

Imagine that each project may end up refactored to a few different go source files.

My hope is to be able to turn this whole thing into a bunch of modules, each with its own vendoring ( when I figure out how to make that work ).

What’s the right way to do this?

Thanks!

submitted by /u/ipeerbhai
[link] [comments]

Article Tags:
· ·
Article Categories:
reddit

Leave a Reply