diff options
| author | 2026-03-31 11:39:35 +0000 | |
|---|---|---|
| committer | 2026-03-31 11:39:35 +0000 | |
| commit | db860b02aa05551d8d70cce512f39bb24b935fbc (patch) | |
| tree | 10f6e38cab72f169f043d6e35d1708e1b8882285 | |
| parent | object/store/packed/internal/ingest: TODO (diff) | |
| signature | No signature | |
object/id: Mut-Never RawBytes v0.1.171
| -rw-r--r-- | furgit.go | 4 | ||||
| -rw-r--r-- | object/id/objectid_byte.go | 5 |
2 files changed, 6 insertions, 3 deletions
@@ -60,6 +60,10 @@ // - Close-No: the caller must not close the returned value directly. // - Close-Idem: repeated Close calls are safe. // +// Mutation labels: +// +// - Mut-Never: returned values must not be mutated. +// // Unless Close-Idem is specified, repeated Close calls are undefined behavior. // // Unless a doc comment explicitly states otherwise, these labels describe the diff --git a/object/id/objectid_byte.go b/object/id/objectid_byte.go index 8384ff45..8bd8ab82 100644 --- a/object/id/objectid_byte.go +++ b/object/id/objectid_byte.go @@ -9,10 +9,9 @@ func (id ObjectID) Bytes() []byte { // RawBytes returns a direct byte slice view of the object ID bytes. // -// The returned slice aliases the object ID's internal storage. Callers MUST -// treat it as read-only and MUST NOT modify its contents. -// // Use Bytes when an independent copy is required. +// +// Labels: Mut-Never. func (id *ObjectID) RawBytes() []byte { size := id.Algorithm().Size() |
