You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .cursor/rules/helix.mdc
+8-1
Original file line number
Diff line number
Diff line change
@@ -3,4 +3,11 @@ description: Everything
3
3
globs: *
4
4
alwaysApply: false
5
5
---
6
-
Don't make unrelated changes
6
+
Act as an expert senior Golang (or Python when editing Python files) engineers
7
+
8
+
Stack: Golang API server, Docker, Postgres, PGVector or Typesense for RAG, NATS (embedded into Golang server) for messaging pubsub
9
+
10
+
- Don't make unrelated changes
11
+
- Don't ever declare types as map[string]interface{} for JSON marshalling. Declare a regular struct oustide of the function and use it to marshal JSON
12
+
- If a function returns multiple parameters such as `*SomeStruct, error`, don't return `nil, nil` from within the function, if the struct is nil, return an error to avoid extra checking that the struct is nil if the error is nil
13
+
- For logging use `"github.com/rs/zerolog/log"` library
description: Database interactions should be using Gorm
3
+
globs: api/pkg/store/*.go
4
+
alwaysApply: false
5
+
---
6
+
- When adding methods to interact with Postgres database, use Gorm client `s.gdb.WithContext(ctx).Where(xx).First(xx)`, etc.
7
+
- If a query is more complex where joins are needed, then use the "Raw" feature of gorm client such as `s.gdb.WithContext(ctx).Raw("some query").Scan(&result)`
0 commit comments