Fast implementation of Git in pure Go codeberg.org/lindenii/furgit
git go
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

object/id: Mut-Never RawBytes

Runxi Yu db860b02 8241d389

+6 -3
+4
furgit.go
··· 60 60 // - Close-No: the caller must not close the returned value directly. 61 61 // - Close-Idem: repeated Close calls are safe. 62 62 // 63 + // Mutation labels: 64 + // 65 + // - Mut-Never: returned values must not be mutated. 66 + // 63 67 // Unless Close-Idem is specified, repeated Close calls are undefined behavior. 64 68 // 65 69 // Unless a doc comment explicitly states otherwise, these labels describe the
+2 -3
object/id/objectid_byte.go
··· 9 9 10 10 // RawBytes returns a direct byte slice view of the object ID bytes. 11 11 // 12 - // The returned slice aliases the object ID's internal storage. Callers MUST 13 - // treat it as read-only and MUST NOT modify its contents. 12 + // Use Bytes when an independent copy is required. 14 13 // 15 - // Use Bytes when an independent copy is required. 14 + // Labels: Mut-Never. 16 15 func (id *ObjectID) RawBytes() []byte { 17 16 size := id.Algorithm().Size() 18 17