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

Method SetProto

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

Source from the content-addressed store, hash-verified

93}
94
95func (s *stringSink) SetProto(m proto.Message) error {
96 b, err := proto.Marshal(m)
97 if err != nil {
98 return err
99 }
100 s.v.b = b
101 *s.sp = string(b)
102 return nil
103}
104
105// ByteViewSink returns a Sink that populates a ByteView.
106func ByteViewSink(dst *ByteView) Sink {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected