diff options
Diffstat (limited to 'content/posts/002.md')
| -rw-r--r-- | content/posts/002.md | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/content/posts/002.md b/content/posts/002.md index 8e22144..93ee423 100644 --- a/content/posts/002.md +++ b/content/posts/002.md @@ -56,7 +56,6 @@ I think the project should grow organically to some degree. What we want to do i Start with a `main.go` and make a `Run` function or some equivalent which it calls. ```go - func Run() error { // actual important stuff here } @@ -71,7 +70,7 @@ This allows you to test your run function in a unit test, and keeps your `main` As your project grows, you can keep it flat inside the root directory -``` +```shell ├── api.go ├── go.mod ├── go.sum @@ -82,7 +81,7 @@ As your project grows, you can keep it flat inside the root directory Even just glancing at that, you can guess that this might be an RSS server, that uses sqlite to back it. Who knows what -``` +```shell ├── drivers ├── entities ├── interfaces @@ -95,7 +94,7 @@ As things evolve you might want to put them in `internal` to hide them from bein I can't be bothered rewriting my example, so here's a random one I found online; it's probably all right. [Server Project](https://go.dev/doc/modules/layout#server-project) -``` +```shell project-root-directory/ go.mod internal/ |
