@shahmilsaari/memory-core 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/profiles/go-api.yml +1 -1
package/package.json
CHANGED
package/profiles/go-api.yml
CHANGED
|
@@ -9,7 +9,7 @@ rules:
|
|
|
9
9
|
- Services own all business logic — they accept and return domain types, not HTTP types
|
|
10
10
|
- Always pass context.Context as the first parameter for cancellation and deadline propagation
|
|
11
11
|
- Return errors explicitly — never panic in library or service code. Reserve panic only for unrecoverable startup failures.
|
|
12
|
-
- Wrap errors
|
|
12
|
+
- Wrap errors at each layer boundary using fmt.Errorf with the %w verb — this chains errors so errors.Is and errors.As work across layers
|
|
13
13
|
- Define small, single-method interfaces at the point of use, not at the point of implementation
|
|
14
14
|
- Use struct-based request/response types for all handler inputs and outputs
|
|
15
15
|
- Validate all incoming request data before passing to the service layer
|