MCPcopy
hub / github.com/bradfitz/gomemcache / Prepend

Method Prepend

memcache/memcache.go:642–644  ·  view source on GitHub ↗

Prepend prepends the given item to the existing item, if a value already exists for its key. ErrNotStored is returned if that condition is not met.

(item *Item)

Source from the content-addressed store, hash-verified

640// Prepend prepends the given item to the existing item, if a value already
641// exists for its key. ErrNotStored is returned if that condition is not met.
642func (c *Client) Prepend(item *Item) error {
643 return c.onItem(item, (*Client).prepend)
644}
645
646func (c *Client) prepend(rw *bufio.ReadWriter, item *Item) error {
647 return c.populateOne(rw, "prepend", item)

Callers 1

testWithClientFunction · 0.80

Calls 1

onItemMethod · 0.95

Tested by 1

testWithClientFunction · 0.64