|
|
|
|
|
by bokwoon
2171 days ago
|
|
One of my favourite abstraction advice comes from this article: https://blog.carlmjohnson.net/post/2020/go-cli-how-to-and-ad.... "You want one layer to handle user input and get it into a normalized form. You want one layer to do your actual task. And you want one layer to handle formatting and output to the user. Those are the three layers you always need." The "do the task" layer can be abstracted again further. But starting it off as a monolithic layer, separated from input and output, is always the right call. |
|