summaryrefslogtreecommitdiff
path: root/content/posts/002.md
diff options
context:
space:
mode:
authora73x <[email protected]>2024-08-31 18:51:42 +0100
committera73x <[email protected]>2024-08-31 18:51:46 +0100
commit68cc8a115d79c97e3c557c70d81d59d0de29ae46 (patch)
treed027f0eb3cb8d1cf0692238dfbb582326661a17e /content/posts/002.md
parent975df0362b6ccfe958e550db246f465b2753baf7 (diff)
feat(html): add syntax highlighting
using a js library until I work out how to use https://github.com/alecthomas/chroma
Diffstat (limited to 'content/posts/002.md')
-rw-r--r--content/posts/002.md7
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/