MCPcopy Create free account
hub / github.com/blobcache/blobcache / SetCode

Method SetCode

src/bcp/message.go:124–127  ·  view source on GitHub ↗
(code MessageCode)

Source from the content-addressed store, hash-verified

122type MessageHeader [HeaderLen]byte
123
124func (h *MessageHeader) SetCode(code MessageCode) {
125 h[0] = code.ObjectType()
126 h[1] = code.OpCode()
127}
128
129func (h MessageHeader) Code() (ret MessageCode) {
130 ret.SetObjectType(h[0])

Callers 1

TestHeaderFunction · 0.95

Calls 2

ObjectTypeMethod · 0.80
OpCodeMethod · 0.80

Tested by 1

TestHeaderFunction · 0.76