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
Entities are domain objects used across the project. They live in the `entities/` directory, organized by domain:
217
216
218
-
**Note:** Entities are organized hierarchically by domain (queue, storage, workflow, etc.) to maintain clear boundaries and separation of concerns. This organization helps:
219
-
- Group related entities together
220
-
- Make dependencies explicit
221
-
- Scale as the number of entities grows
222
-
- Maintain domain-driven design principles
217
+
**Note:** Entities are organized hierarchically by domain (queue, storage, workflow, etc.) to maintain clear boundaries and separation of concerns.
223
218
224
219
```
225
220
entities/
@@ -249,9 +244,14 @@ entities/{domain}/
249
244
**Guidelines:**
250
245
1. Group entities by domain (queue, storage, workflow, etc.)
251
246
2. Keep entities pure and framework-agnostic
252
-
3. Add corresponding tests
253
-
4. Update BUILD.bazel with go_library and go_test targets
1.**Avoid asserting on error messages**: Assert on error type if it is a part of the contract, or assert generic error otherwise.
424
+
2.**Avoid blocking operations for synchronization**: Do not use `time.Sleep` or similar blocking operations to synchronize state. Design the tested routine to signal back (e.g., via channels, callbacks, or condition variables).
425
+
3.**Use testify assertions**: Use `stretchr/assert` or `require` instead of `t.Fatal()`.
426
+
421
427
## Important Notes
422
428
423
429
1.**Never use WORKSPACE**: This repo uses Bzlmod exclusively
0 commit comments