From 68cc8a115d79c97e3c557c70d81d59d0de29ae46 Mon Sep 17 00:00:00 2001 From: a73x Date: Sat, 31 Aug 2024 18:51:42 +0100 Subject: feat(html): add syntax highlighting using a js library until I work out how to use https://github.com/alecthomas/chroma --- content/posts/002.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'content/posts/002.md') 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/ -- cgit v1.2.3