Add writes the given item, if no value already exists for its key. ErrNotStored is returned if that condition is not met.
(item *Item)
| 610 | // Add writes the given item, if no value already exists for its |
| 611 | // key. ErrNotStored is returned if that condition is not met. |
| 612 | func (c *Client) Add(item *Item) error { |
| 613 | return c.onItem(item, (*Client).add) |
| 614 | } |
| 615 | |
| 616 | func (c *Client) add(rw *bufio.ReadWriter, item *Item) error { |
| 617 | return c.populateOne(rw, "add", item) |