// Inc increases the stored counter's value by the passed increment.
Inc increases the stored counter's value by the passed increment.
// Inc increases the stored counter ' s value by the passed increment .
func (c *PCPCounter) Inc(val int64) error {
	c.mutex.Lock()
	defer c.mutex.Unlock()
	if val < 0 {
		return errors.New("cannot decrement a counter")
	}
	if val == 0 {
		return nil
	}
	v := c.val.(int64)
	v += val
	return c.set(v)
}
func ( c * PCPCounter ) Inc ( val int64 ) error { c . mutex . Lock ( ) defer c . mutex . Unlock ( ) if val < 0 { return errors . New ( " " ) } if val == 0 { return nil } v := c . val . ( int64 ) v += val return c . set ( v ) }
Inc increases the stored counter's value by the passed increment.
Inc increases the stored counter ' s value by the passed increment .