aboutsummaryrefslogtreecommitdiff
path: root/object/blob/clone.go
blob: 7106c3aa1f78cc886ae77f2badb0800c91dcb5fa (about) (plain) (blame)
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)}
}