MCPcopy Index your code
hub / github.com/golang/groupcache / setView

Method setView

sinks.go:227–235  ·  view source on GitHub ↗
(v ByteView)

Source from the content-addressed store, hash-verified

225}
226
227func (s *allocBytesSink) setView(v ByteView) error {
228 if v.b != nil {
229 *s.dst = cloneBytes(v.b)
230 } else {
231 *s.dst = []byte(v.s)
232 }
233 s.v = v
234 return nil
235}
236
237func (s *allocBytesSink) SetProto(m proto.Message) error {
238 b, err := proto.Marshal(m)

Callers

nothing calls this directly

Calls 1

cloneBytesFunction · 0.85

Tested by

no test coverage detected