code: func (s *StreamWriter) Append(expectedVersion *int, events ...*Event) error {
  	u := fmt.Sprintf("/streams/%s", s.streamName)
  	req, err := s.client.NewRequest(http.MethodPost, u, events)
  	if err != nil {
  		return err
  	}
  
  	req.Header.Set("Content-Type", "application/vnd.eventstore.events+json")
  	if expectedVersion != nil {
  		req.Header.Set("ES-ExpectedVersion", strconv.Itoa(*expectedVersion))
  	}
  
  	_, err = s.client.Do(req, nil)
  	if err != nil {
  		if e, ok := err.(*ErrBadRequest); ok {
  			return &ErrConcurrencyViolation{ErrorResponse: e.ErrorResponse}
  		}
  		return err
  	}
  
  	return nil
  }
docs: // Append writes an event to the head of the stream.
  //
  // If the stream does not exist, it will be created.
  //
  // There are some special version numbers that can be provided.
  // http://docs.geteventstore.com/http-api/3.7.0/writing-to-a-stream/
  //
  // -2 : The write should never conflict with anything and should always succeed.
  //
  // -1 : The stream should not exist at the time of writing. This write will create it.
  //
  // 0 : The stream should exist but it should be empty.