1 2 3 4 5 6 7 8 9 10 11
package blob import "bytes" // Clone returns a deep copy of the blob // whose Data is independent of any memory the original may alias. // // Labels: Life-Independent. func (blob *Blob) Clone() *Blob { return &Blob{Data: bytes.Clone(blob.Data)} }