func (lo *largeObject) putPart(part *part) error {
	container := lo.container
	objectName := lo.objectName + "/" + lo.timestamp + "/" + fmt.Sprintf("%d", part.PartNumber)

	lo.logger.Debug(swiftLargeObjectLogTag, "Upload Part: (", container, objectName, part.len, fmt.Sprintf("%x", part.contentMd5), part.ETag, ")")

	if _, err := part.r.Seek(0, 0); err != nil { // move back to beginning, if retrying
		return err
	}

	headers, err := lo.c.ObjectPut(container, objectName, part.r, true, "", "", nil)
	if err != nil {
		return err
	}

	s := headers["Etag"]
	if part.ETag != s {
		return fmt.Errorf("Response etag does not match. Remote:%s Calculated: %s", s, part.ETag)
	}
	return nil
}
func (lo *largeObject) putPart(part *part) error {
	container := lo.container
	objectName := lo.objectName + "/" + lo.timestamp + "/" + fmt.Sprintf("%d", part.PartNumber)

	lo.logger.Debug(swiftLargeObjectLogTag, "Upload Part: (", container, objectName, part.len, fmt.Sprintf("%x", part.contentMd5), part.ETag, ")")

	if _, err := part.r.Seek(0, 0); err != nil { 
		return err
	}

	headers, err := lo.c.ObjectPut(container, objectName, part.r, true, "", "", nil)
	if err != nil {
		return err
	}

	s := headers["Etag"]
	if part.ETag != s {
		return fmt.Errorf("Response etag does not match. Remote:%s Calculated: %s", s, part.ETag)
	}
	return nil
}
func ( lo * largeObject ) putPart ( part * part ) error { container := lo . container objectName := lo . objectName + " " + lo . timestamp + " " + fmt . Sprintf ( " " , part . PartNumber ) lo . logger . Debug ( swiftLargeObjectLogTag , " " , container , objectName , part . len , fmt . Sprintf ( " " , part . contentMd5 ) , part . ETag , " " ) if _ , err := part . r . Seek ( 0 , 0 ) ; err != nil { // move back to beginning, if retrying return err } headers , err := lo . c . ObjectPut ( container , objectName , part . r , true , " " , " " , nil ) if err != nil { return err } s := headers [ " " ] if part . ETag != s { return fmt . Errorf ( " " , s , part . ETag ) } return nil }
// uploads a part, checking the etag against the calculated value
uploads a part checking the etag against the calculated value