In my code I want to do or not to do some actions depending on document with given key existence. But can't avoid additional network overhead retrieving all document content.
Now I'm using
cas, err := bucket.Get(key, &value)
And looking for
err == gocb.ErrKeyNotFound to determine document missed case.
Is there some more efficient approach?