We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 312bad8 commit 59a4691Copy full SHA for 59a4691
pkg/exception/exception.go
@@ -8,6 +8,10 @@ var exceptionIdTag = "exception_id"
8
9
type Exception uint16
10
11
+func (e Exception) Ptr() *Exception {
12
+ return &e
13
+}
14
+
15
/*
16
Errors explained:
17
@@ -18,7 +22,11 @@ X - Unknown (0) | Non-Critical (1) | Critical (2);
18
22
Z - Error code
19
23
*/
20
24
const (
21
- IdUnknown Exception = 1000
25
+ IdUnknown Exception = 1001
26
27
+ IdRouteError Exception = 2101
28
+ IdServerError Exception = 2201
29
+ IdDBError Exception = 2202
30
31
IdGenericNotFound Exception = 3101
32
pkg/utils/ptr.go
@@ -1,5 +1,10 @@
1
package utils
2
3
+var (
4
+ False *bool = ToPtr(false)
5
+ True *bool = ToPtr(true)
6
+)
7
func ToPtr[T any](obj T) *T {
return &obj
}
0 commit comments