From 1da4a0ec11344c2ba755d917021140b7efa2b4da Mon Sep 17 00:00:00 2001 From: Daria Bialobrzeska Date: Wed, 21 Feb 2024 10:39:04 +0100 Subject: [PATCH] Update version in bugsnag.go to 2.2.1 --- v2/bugsnag.go | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/v2/bugsnag.go b/v2/bugsnag.go index d35d82a..deef53c 100644 --- a/v2/bugsnag.go +++ b/v2/bugsnag.go @@ -21,7 +21,7 @@ import ( ) // Version defines the version of this Bugsnag notifier -const Version = "2.2.0" +const Version = "2.2.1" var panicHandlerOnce sync.Once var sessionTrackerOnce sync.Once @@ -91,11 +91,13 @@ func Notify(err error, rawData ...interface{}) error { // The rawData is used to send extra information along with any // panics that are handled this way. // Usage: -// go func() { -// ctx := bugsnag.StartSession(context.Background()) -// defer bugsnag.AutoNotify(ctx) -// // (possibly crashy code) -// }() +// +// go func() { +// ctx := bugsnag.StartSession(context.Background()) +// defer bugsnag.AutoNotify(ctx) +// // (possibly crashy code) +// }() +// // See also: bugsnag.Recover() func AutoNotify(rawData ...interface{}) { if err := recover(); err != nil { @@ -122,18 +124,22 @@ func AutoNotify(rawData ...interface{}) { // The rawData is used to send extra information along with // any panics that are handled this way // Usage: -// go func() { -// ctx := bugsnag.StartSession(context.Background()) -// defer bugsnag.Recover(ctx) -// // (possibly crashy code) -// }() +// +// go func() { +// ctx := bugsnag.StartSession(context.Background()) +// defer bugsnag.Recover(ctx) +// // (possibly crashy code) +// }() +// // If you wish that any panics caught by the call to Recover shall affect your // stability score (it does not by default): -// go func() { -// ctx := bugsnag.StartSession(context.Background()) -// defer bugsnag.Recover(ctx, bugsnag.HandledState{Unhandled: true}) -// // (possibly crashy code) -// }() +// +// go func() { +// ctx := bugsnag.StartSession(context.Background()) +// defer bugsnag.Recover(ctx, bugsnag.HandledState{Unhandled: true}) +// // (possibly crashy code) +// }() +// // See also: bugsnag.AutoNotify() func Recover(rawData ...interface{}) { if err := recover(); err != nil {