blob: 1796d42fa7d93a818cb0a0a969206b945baf4632 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
package blob
// Parse decodes a blob object body.
//
// The returned blob aliases body:
// its Data shares the same backing array,
// so the blob inherits body's lifetime
// and must not be mutated unless body may be.
// Use [Blob.Clone] for an independent copy.
//
// Labels: Life-Parent, Mut-No.
func Parse(body []byte) (*Blob, error) {
return &Blob{Data: body}, nil
}
|