func (notifier *Notifier) Notify(err error, rawData ...interface{}) (e error) {
	event, config := newEvent(errors.New(err, 1), rawData, notifier)
	e = middleware.Run(event, config, func() error {
		config.logf("notifying bugsnag: %s", event.Message)
		if config.notifyInReleaseStage() {
			if config.Synchronous {
				return (&payload{event, config}).deliver()
			}
			go func(event *Event, config *Configuration) {
				err := (&payload{event, config}).deliver()
				if err != nil {
					config.logf("bugsnag.Notify: %v", err)
				}
			}(event, config)
			return nil
		}
		return fmt.Errorf("not notifying in %s", config.ReleaseStage)
	})
	if e != nil {
		config.logf("bugsnag.Notify: %v", e)
	}
	return e
}
Notify sends an error to Bugsnag. Any rawData you pass here will be sent to
Bugsnag after being converted to JSON. e.g. bugsnag.SeverityError, bugsnag.Context,
or bugsnag.MetaData.
package bugsnag
import (
	"fmt"
	"github.com/bugsnag/bugsnag-go/errors"
)
type Notifier struct {
	Config  *Configuration
	RawData []interface{}
}
func New(rawData ...interface{}) *Notifier {
	config := Config.clone()
	for i, datum := range rawData {
		if c, ok := datum.(Configuration); ok {
			config.update(&c)
			rawData[i] = nil
		}
	}
	return &Notifier{
		Config:  config,
		RawData: rawData,
	}
}