code: func (client *Client) UploadBuildpack(buildpackGUID string, buildpackPath string, buildpack io.Reader, buildpackLength int64) (Warnings, error) {
  
  	contentLength, err := buildpacks.CalculateRequestSize(buildpackLength, buildpackPath, "buildpack")
  	if err != nil {
  		return nil, err
  	}
  
  	contentType, body, writeErrors := buildpacks.CreateMultipartBodyAndHeader(buildpack, buildpackPath, "buildpack")
  
  	request, err := client.newHTTPRequest(requestOptions{
  		RequestName: internal.PutBuildpackBitsRequest,
  		URIParams:   Params{"buildpack_guid": buildpackGUID},
  		Body:        body,
  	})
  
  	if err != nil {
  		return nil, err
  	}
  
  	request.Header.Set("Content-Type", contentType)
  	request.ContentLength = contentLength
  
  	_, warnings, err := client.uploadBuildpackAsynchronously(request, writeErrors)
  	if err != nil {
  		return warnings, err
  	}
  	return warnings, nil
  }
docs: // UploadBuildpack uploads the contents of a buildpack zip to the server.