1 // nolint: goconst 2 package bugsnaghandler_test 3 4 import ( 5 "github.com/bugsnag/bugsnag-go" 6 7 "github.com/goph/emperror/handler/bugsnaghandler" 8 ) 9 10 func ExampleNew() { 11 apiKey := "key" 12 13 _ = bugsnaghandler.New(apiKey) 14 15 // Output: 16 } 17 18 func ExampleNewFromNotifier() { 19 apiKey := "key" 20 21 _ = bugsnaghandler.NewFromNotifier(bugsnag.New(bugsnag.Configuration{ 22 APIKey: apiKey, 23 })) 24 25 // Output: 26 } 27