Skip to content

Commit 595a54e

Browse files
committed
updating documentation
1 parent dbb07ca commit 595a54e

5 files changed

Lines changed: 183 additions & 164 deletions

File tree

.gomarkdoc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
output: "{{.Dir}}/README.md"
2+
header: |+
3+
[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/go-coldbrew/errors)
4+

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ test:
77

88
doc:
99
go get github.com/princjef/gomarkdoc/cmd/gomarkdoc
10-
gomarkdoc ./... > README.md
10+
gomarkdoc ./...

README.md

Lines changed: 8 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<!-- Code generated by gomarkdoc. DO NOT EDIT -->
22

3+
[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/go-coldbrew/errors)
4+
35
# errors
46

57
```go
@@ -10,7 +12,12 @@ Package errors provides an implementation of golang error with stack strace info
1012

1113
### How To Use
1214

13-
The simplest way to use this package is by calling one of the two functions errors\.New\(\.\.\.\) errors\.Wrap\(\.\.\.\)
15+
The simplest way to use this package is by calling one of the two functions
16+
17+
```
18+
errors.New(...)
19+
errors.Wrap(...)
20+
```
1421

1522
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\.
1623

@@ -141,168 +148,6 @@ type StackFrame struct {
141148
}
142149
```
143150

144-
# notifier
145-
146-
```go
147-
import "github.com/go-coldbrew/errors/notifier"
148-
```
149-
150-
## Index
151-
152-
- [func Close()](<#func-close>)
153-
- [func GetTraceHeaderName() string](<#func-gettraceheadername>)
154-
- [func GetTraceId(ctx context.Context) string](<#func-gettraceid>)
155-
- [func InitAirbrake(projectID int64, projectKey string)](<#func-initairbrake>)
156-
- [func InitBugsnag(config bugsnag.Configuration)](<#func-initbugsnag>)
157-
- [func InitRollbar(token, env string)](<#func-initrollbar>)
158-
- [func InitSentry(dsn string)](<#func-initsentry>)
159-
- [func Notify(err error, rawData ...interface{}) error](<#func-notify>)
160-
- [func NotifyOnPanic(rawData ...interface{})](<#func-notifyonpanic>)
161-
- [func NotifyWithExclude(err error, rawData ...interface{}) error](<#func-notifywithexclude>)
162-
- [func NotifyWithLevel(err error, level string, rawData ...interface{}) error](<#func-notifywithlevel>)
163-
- [func NotifyWithLevelAndSkip(err error, skip int, level string, rawData ...interface{}) error](<#func-notifywithlevelandskip>)
164-
- [func SetEnvironment(env string)](<#func-setenvironment>)
165-
- [func SetHostname(name string)](<#func-sethostname>)
166-
- [func SetRelease(rel string)](<#func-setrelease>)
167-
- [func SetServerRoot(path string)](<#func-setserverroot>)
168-
- [func SetTraceHeaderName(name string)](<#func-settraceheadername>)
169-
- [func SetTraceId(ctx context.Context) context.Context](<#func-settraceid>)
170-
- [func UpdateTraceId(ctx context.Context, traceID string) context.Context](<#func-updatetraceid>)
171-
- [type Tags](<#type-tags>)
172-
173-
174-
## func [Close](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L348>)
175-
176-
```go
177-
func Close()
178-
```
179-
180-
## func [GetTraceHeaderName](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L42>)
181-
182-
```go
183-
func GetTraceHeaderName() string
184-
```
185-
186-
## func [GetTraceId](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L394>)
187-
188-
```go
189-
func GetTraceId(ctx context.Context) string
190-
```
191-
192-
GetTraceId fetches traceID from context
193-
194-
## func [InitAirbrake](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L60>)
195-
196-
```go
197-
func InitAirbrake(projectID int64, projectKey string)
198-
```
199-
200-
InitAirbrake inits airbrake configuration
201-
202-
## func [InitBugsnag](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L65>)
203-
204-
```go
205-
func InitBugsnag(config bugsnag.Configuration)
206-
```
207-
208-
InitBugsnag inits bugsnag configuration
209-
210-
## func [InitRollbar](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L71>)
211-
212-
```go
213-
func InitRollbar(token, env string)
214-
```
215-
216-
InitRollbar inits rollbar configuration
217-
218-
## func [InitSentry](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L77>)
219-
220-
```go
221-
func InitSentry(dsn string)
222-
```
223-
224-
## func [Notify](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L156>)
225-
226-
```go
227-
func Notify(err error, rawData ...interface{}) error
228-
```
229-
230-
## func [NotifyOnPanic](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L304>)
231-
232-
```go
233-
func NotifyOnPanic(rawData ...interface{})
234-
```
235-
236-
## func [NotifyWithExclude](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L279>)
237-
238-
```go
239-
func NotifyWithExclude(err error, rawData ...interface{}) error
240-
```
241-
242-
## func [NotifyWithLevel](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L160>)
243-
244-
```go
245-
func NotifyWithLevel(err error, level string, rawData ...interface{}) error
246-
```
247-
248-
## func [NotifyWithLevelAndSkip](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L164>)
249-
250-
```go
251-
func NotifyWithLevelAndSkip(err error, skip int, level string, rawData ...interface{}) error
252-
```
253-
254-
## func [SetEnvironment](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L354>)
255-
256-
```go
257-
func SetEnvironment(env string)
258-
```
259-
260-
## func [SetHostname](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L423>)
261-
262-
```go
263-
func SetHostname(name string)
264-
```
265-
266-
## func [SetRelease](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L365>)
267-
268-
```go
269-
func SetRelease(rel string)
270-
```
271-
272-
## func [SetServerRoot](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L419>)
273-
274-
```go
275-
func SetServerRoot(path string)
276-
```
277-
278-
## func [SetTraceHeaderName](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L38>)
279-
280-
```go
281-
func SetTraceHeaderName(name string)
282-
```
283-
284-
## func [SetTraceId](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L370>)
285-
286-
```go
287-
func SetTraceId(ctx context.Context) context.Context
288-
```
289-
290-
SetTraceId updates the traceID based on context values
291-
292-
## func [UpdateTraceId](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L411>)
293-
294-
```go
295-
func UpdateTraceId(ctx context.Context, traceID string) context.Context
296-
```
297-
298-
UpdateTraceId force updates the traced id to provided id
299-
300-
## type [Tags](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L51>)
301-
302-
```go
303-
type Tags map[string]string
304-
```
305-
306151

307152

308153
Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)

doc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ the error objects created by this package are compatible with https://golang.org
44
How To Use
55
66
The simplest way to use this package is by calling one of the two functions
7+
78
errors.New(...)
89
errors.Wrap(...)
910

notifier/README.md

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
<!-- Code generated by gomarkdoc. DO NOT EDIT -->
2+
3+
[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/go-coldbrew/errors)
4+
5+
# notifier
6+
7+
```go
8+
import "github.com/go-coldbrew/errors/notifier"
9+
```
10+
11+
## Index
12+
13+
- [func Close()](<#func-close>)
14+
- [func GetTraceHeaderName() string](<#func-gettraceheadername>)
15+
- [func GetTraceId(ctx context.Context) string](<#func-gettraceid>)
16+
- [func InitAirbrake(projectID int64, projectKey string)](<#func-initairbrake>)
17+
- [func InitBugsnag(config bugsnag.Configuration)](<#func-initbugsnag>)
18+
- [func InitRollbar(token, env string)](<#func-initrollbar>)
19+
- [func InitSentry(dsn string)](<#func-initsentry>)
20+
- [func Notify(err error, rawData ...interface{}) error](<#func-notify>)
21+
- [func NotifyOnPanic(rawData ...interface{})](<#func-notifyonpanic>)
22+
- [func NotifyWithExclude(err error, rawData ...interface{}) error](<#func-notifywithexclude>)
23+
- [func NotifyWithLevel(err error, level string, rawData ...interface{}) error](<#func-notifywithlevel>)
24+
- [func NotifyWithLevelAndSkip(err error, skip int, level string, rawData ...interface{}) error](<#func-notifywithlevelandskip>)
25+
- [func SetEnvironment(env string)](<#func-setenvironment>)
26+
- [func SetHostname(name string)](<#func-sethostname>)
27+
- [func SetRelease(rel string)](<#func-setrelease>)
28+
- [func SetServerRoot(path string)](<#func-setserverroot>)
29+
- [func SetTraceHeaderName(name string)](<#func-settraceheadername>)
30+
- [func SetTraceId(ctx context.Context) context.Context](<#func-settraceid>)
31+
- [func UpdateTraceId(ctx context.Context, traceID string) context.Context](<#func-updatetraceid>)
32+
- [type Tags](<#type-tags>)
33+
34+
35+
## func [Close](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L348>)
36+
37+
```go
38+
func Close()
39+
```
40+
41+
## func [GetTraceHeaderName](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L42>)
42+
43+
```go
44+
func GetTraceHeaderName() string
45+
```
46+
47+
## func [GetTraceId](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L394>)
48+
49+
```go
50+
func GetTraceId(ctx context.Context) string
51+
```
52+
53+
GetTraceId fetches traceID from context
54+
55+
## func [InitAirbrake](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L60>)
56+
57+
```go
58+
func InitAirbrake(projectID int64, projectKey string)
59+
```
60+
61+
InitAirbrake inits airbrake configuration
62+
63+
## func [InitBugsnag](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L65>)
64+
65+
```go
66+
func InitBugsnag(config bugsnag.Configuration)
67+
```
68+
69+
InitBugsnag inits bugsnag configuration
70+
71+
## func [InitRollbar](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L71>)
72+
73+
```go
74+
func InitRollbar(token, env string)
75+
```
76+
77+
InitRollbar inits rollbar configuration
78+
79+
## func [InitSentry](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L77>)
80+
81+
```go
82+
func InitSentry(dsn string)
83+
```
84+
85+
## func [Notify](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L156>)
86+
87+
```go
88+
func Notify(err error, rawData ...interface{}) error
89+
```
90+
91+
## func [NotifyOnPanic](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L304>)
92+
93+
```go
94+
func NotifyOnPanic(rawData ...interface{})
95+
```
96+
97+
## func [NotifyWithExclude](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L279>)
98+
99+
```go
100+
func NotifyWithExclude(err error, rawData ...interface{}) error
101+
```
102+
103+
## func [NotifyWithLevel](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L160>)
104+
105+
```go
106+
func NotifyWithLevel(err error, level string, rawData ...interface{}) error
107+
```
108+
109+
## func [NotifyWithLevelAndSkip](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L164>)
110+
111+
```go
112+
func NotifyWithLevelAndSkip(err error, skip int, level string, rawData ...interface{}) error
113+
```
114+
115+
## func [SetEnvironment](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L354>)
116+
117+
```go
118+
func SetEnvironment(env string)
119+
```
120+
121+
## func [SetHostname](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L423>)
122+
123+
```go
124+
func SetHostname(name string)
125+
```
126+
127+
## func [SetRelease](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L365>)
128+
129+
```go
130+
func SetRelease(rel string)
131+
```
132+
133+
## func [SetServerRoot](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L419>)
134+
135+
```go
136+
func SetServerRoot(path string)
137+
```
138+
139+
## func [SetTraceHeaderName](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L38>)
140+
141+
```go
142+
func SetTraceHeaderName(name string)
143+
```
144+
145+
## func [SetTraceId](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L370>)
146+
147+
```go
148+
func SetTraceId(ctx context.Context) context.Context
149+
```
150+
151+
SetTraceId updates the traceID based on context values
152+
153+
## func [UpdateTraceId](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L411>)
154+
155+
```go
156+
func UpdateTraceId(ctx context.Context, traceID string) context.Context
157+
```
158+
159+
UpdateTraceId force updates the traced id to provided id
160+
161+
## type [Tags](<https://github.com/go-coldbrew/errors/blob/main/notifier/notifier.go#L51>)
162+
163+
```go
164+
type Tags map[string]string
165+
```
166+
167+
168+
169+
Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)

0 commit comments

Comments
 (0)