code: func (client *Client) UploadBitsPackage(pkg Package, matchedResources []Resource, newResources io.Reader, newResourcesLength int64) (Package, Warnings, error) {
  	link, ok := pkg.Links["upload"]
  	if !ok {
  		return Package{}, nil, ccerror.UploadLinkNotFoundError{PackageGUID: pkg.GUID}
  	}
  
  	if matchedResources == nil {
  		return Package{}, nil, ccerror.NilObjectError{Object: "matchedResources"}
  	}
  
  	if newResources == nil {
  		return client.uploadExistingResourcesOnly(link, matchedResources)
  	}
  
  	return client.uploadNewAndExistingResources(link, matchedResources, newResources, newResourcesLength)
  }
docs: // UploadBitsPackage uploads the newResources and a list of existing resources
  // to the cloud controller. An updated package is returned. The function will
  // act differently given the following Readers:
  //   - io.ReadSeeker: Will function properly on retry.
  //   - io.Reader: Will return a ccerror.PipeSeekError on retry.
  //   - nil: Will not add the "application" section to the request. The newResourcesLength is ignored in this case.
  //
  // Note: In order to determine if package creation is successful, poll the
  // Package's state field for more information.