code: func Notify(config *Config, jobName string, eventName string, err error, trace *stack.Trace, kvs map[string]string) error {
  
  	// Make a struct that serializes to the JSON needed for the API request to bugsnag
  	p := newPayload(config, jobName, eventName, err, trace, kvs)
  
  	// JSON serialize it
  	data, err := json.MarshalIndent(p, "", "\t")
  	if err != nil {
  		return err
  	}
  
  	// Post it to the server:
  	client := http.Client{}
  	resp, err := client.Post(config.Endpoint, "application/json", bytes.NewBuffer(data))
  	if err != nil {
  		return err
  	}
  	body, err := ioutil.ReadAll(resp.Body)
  	if err != nil {
  		return err
  	}
  	if string(body) != "OK" {
  		return fmt.Errorf("response from bugsnag wasn't 'OK'")
  	}
  
  	return nil
  }
docs: // Notify will send the error and stack trace to Bugsnag. Note that this doesn't take advantage of all of Bugsnag's capabilities.