KeyExists
from go.etcd.io/etcd/client/v3/clientv3util
instead GO-R1001The call to the function could be abstracted by using a utility function called
KeyExists
from the package go.etcd.io/etcd/client/v3/clientv3util
. It is
recommended to use the KeyExists
function instead.
Signature of KeyExists
function:
func KeyExists(key string) clientv3.Cmp {
return clientv3.Compare(clientv3.Version(key), ">", 0)
}
clientv3.Compare(clientv3.Version(key), ">", 0)
clientv3util.KeyExists(key)