...
1
2 package airbrakehandler_test
3
4 import (
5 "github.com/airbrake/gobrake"
6
7 "github.com/goph/emperror/handler/airbrakehandler"
8 )
9
10 func ExampleNew() {
11 projectID := int64(1)
12 projectKey := "key"
13
14 handler := airbrakehandler.New(projectID, projectKey)
15 defer handler.Close()
16
17
18 }
19
20 func ExampleNewFromNotifier() {
21 projectID := int64(1)
22 projectKey := "key"
23
24 notifier := gobrake.NewNotifier(projectID, projectKey)
25 handler := airbrakehandler.NewFromNotifier(notifier)
26 defer handler.Close()
27
28
29 }
30
31 func ExampleNewSync() {
32 projectID := int64(1)
33 projectKey := "key"
34
35 handler := airbrakehandler.NewSync(projectID, projectKey)
36 defer handler.Close()
37
38
39 }
40
41 func ExampleNewSyncFromNotifier() {
42 projectID := int64(1)
43 projectKey := "key"
44
45 notifier := gobrake.NewNotifier(projectID, projectKey)
46 handler := airbrakehandler.NewSyncFromNotifier(notifier)
47 defer handler.Close()
48
49
50 }
51
View as plain text