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: README.md
+34-15Lines changed: 34 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,18 +8,32 @@
8
8
import"github.com/go-coldbrew/errors"
9
9
```
10
10
11
-
Package errors provides an implementation of golang error with stack strace information attached to it\, the error objects created by this package are compatible with https://golang.org/pkg/errors/
11
+
Package errors provides an implementation of golang error with stack strace information attached to it, the error objects created by this package are compatible with https://golang.org/pkg/errors/
12
12
13
13
### How To Use
14
-
15
14
The simplest way to use this package is by calling one of the two functions
16
15
17
16
```
18
17
errors.New(...)
19
18
errors.Wrap(...)
20
19
```
21
20
22
-
You can also initialize custom error stack by using one of the \`WithSkip\` functions\.\`WithSkip\` allows skipping the defined number of functions from the stack information\.
21
+
You can also initialize custom error stack by using one of the \`WithSkip\` functions. \`WithSkip\` allows skipping the defined number of functions from the stack information.
22
+
23
+
```
24
+
if you want to create a new error use New
25
+
if you want to skip some functions on the stack use NewWithSkip
26
+
if you want to add GRPC status use NewWithStatus
27
+
if you want to skip some functions on the stack and add GRPC status use NewWithSkipAndStatus
28
+
if you want to wrap an existing error use Wrap
29
+
if you want to wrap an existing error and add GRPC status use WrapWithStatus
30
+
if you want to wrap an existing error and skip some functions on the stack use WrapWithSkip
31
+
if you want to wrap an existing error, skip some functions on the stack and add GRPC status use WrapWithSkipAndStatus
32
+
if you want to wrap an existing error and add notifier options use WrapWithNotifier
33
+
if you want to wrap an existing error, skip some functions on the stack and add notifier options use WrapWithSkipAndNotifier
34
+
```
35
+
36
+
Head to https://docs.coldbrew.cloud for more information.
23
37
24
38
## Index
25
39
@@ -37,21 +51,24 @@ You can also initialize custom error stack by using one of the \`WithSkip\` func
func WrapWithSkipAndStatus(err error, msg string, skip int, status *grpcstatus.Status) ErrorExt
116
133
```
117
134
118
135
WrapWithSkip wraps an existing error and appends stack information if it does not exists skipping the number of function on the stack along with GRPC status
//WrapWithSkip wraps an existing error and appends stack information if it does not exists skipping the number of function on the stack along with GRPC status
181
+
//WrapWithSkip wraps an existing error and appends stack information if it does not exists skipping the number of function on the stack along with GRPC status
0 commit comments