code: func (s *StreamWriter) WriteMetaData(stream string, metadata interface{}) error {
  	m := NewEvent("", "MetaData", metadata, nil)
  	mURL, _, err := s.client.GetMetadataURL(stream)
  	if err != nil {
  		return err
  	}
  	req, err := s.client.NewRequest(http.MethodPost, mURL, m)
  	if err != nil {
  		return err
  	}
  
  	req.Header.Set("Content-Type", "application/vnd.eventstore.events+json")
  
  	_, err = s.client.Do(req, nil)
  	if err != nil {
  		return err
  	}
  
  	return nil
  }
docs: // WriteMetaData writes the metadata for a stream.
  //
  // The operation will replace the current stream metadata.
  //
  // For more information on stream metadata see:
  // http://docs.geteventstore.com/http-api/3.7.0/stream-metadata/
  //
  // If the metadata was written successfully the error returned will be nil.
  //
  // If an error occurs the error returned may be an ErrUnauthorized, a
  // ErrTemporarilyUnavailable or an ErrUnexpected if the error occurred during a
  // http request to the server. In these cases, the *ErrorResponse will be available
  // for inspection as an ErrorResponse field on the error.
  // If an error occurred outside of the http request another type of error will be returned
  // such as a *url.Error in cases where the streamwriter is unable to connect to the server.