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

Method SetString

sinks.go:259–267  ·  view source on GitHub ↗
(v string)

Source from the content-addressed store, hash-verified

257}
258
259func (s *allocBytesSink) SetString(v string) error {
260 if s.dst == nil {
261 return errors.New("nil AllocatingByteSliceSink *[]byte dst")
262 }
263 *s.dst = []byte(v)
264 s.v.b = nil
265 s.v.s = v
266 return nil
267}
268
269// TruncatingByteSliceSink returns a Sink that writes up to len(*dst)
270// bytes to *dst. If more bytes are available, they're silently

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected