code: func (k *KV) CAS(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) {
  	params := make(map[string]string, 2)
  	if p.Flags != 0 {
  		params["flags"] = strconv.FormatUint(p.Flags, 10)
  	}
  	params["cas"] = strconv.FormatUint(p.ModifyIndex, 10)
  	return k.put(p.Key, params, p.Value, q)
  }
docs: // CAS is used for a Check-And-Set operation. The Key,
  // ModifyIndex, Flags and Value are respected. Returns true
  // on success or false on failures.