PopulateParts sets the "parts" field of the blob with the provided parts. The sum of the sizes of parts must match the provided size or an error is returned. Also, each BytesPart may only contain either a BytesPart or a BlobRef, but not both.
(size int64, parts []BytesPart)
| 733 | // or an error is returned. Also, each BytesPart may only contain either |
| 734 | // a BytesPart or a BlobRef, but not both. |
| 735 | func (bb *Builder) PopulateParts(size int64, parts []BytesPart) error { |
| 736 | return populateParts(bb.m, size, parts) |
| 737 | } |
| 738 | |
| 739 | func populateParts(m map[string]interface{}, size int64, parts []BytesPart) error { |
| 740 | sumSize := int64(0) |