MCPcopy Create free account
hub / github.com/golang/groupcache / SetProto

Method SetProto

sinks.go:135–142  ·  view source on GitHub ↗
(m proto.Message)

Source from the content-addressed store, hash-verified

133}
134
135func (s *byteViewSink) SetProto(m proto.Message) error {
136 b, err := proto.Marshal(m)
137 if err != nil {
138 return err
139 }
140 *s.dst = ByteView{b: b}
141 return nil
142}
143
144func (s *byteViewSink) SetBytes(b []byte) error {
145 *s.dst = ByteView{b: cloneBytes(b)}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected