-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhandler_test.go
52 lines (36 loc) · 1 KB
/
handler_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// nolint: goconst
package airbrake_test
import (
"github.com/airbrake/gobrake"
"emperror.dev/handler/airbrake"
)
func ExampleNew() {
projectID := int64(1)
projectKey := "key"
handler := airbrake.New(projectID, projectKey)
defer handler.Close() // Make sure to close the handler to flush all error reporting in progress
// Output:
}
func ExampleNewFromNotifier() {
projectID := int64(1)
projectKey := "key"
notifier := gobrake.NewNotifier(projectID, projectKey)
handler := airbrake.NewFromNotifier(notifier)
defer handler.Close() // Make sure to close the handler to flush all error reporting in progress
// Output:
}
func ExampleNewSync() {
projectID := int64(1)
projectKey := "key"
handler := airbrake.NewSync(projectID, projectKey)
defer handler.Close()
// Output:
}
func ExampleNewSyncFromNotifier() {
projectID := int64(1)
projectKey := "key"
notifier := gobrake.NewNotifier(projectID, projectKey)
handler := airbrake.NewSyncFromNotifier(notifier)
defer handler.Close()
// Output:
}