title: google app engine go datastore check for entity existence using key
body: <p>Given a stringId key for an entity, how do I check if there is a corresponding entity in datastore. I do not want to fetch the entity completely. I want to check if the entity exists or not.<br>
  Is there a performance impact if I fetch the complete entity to check its existence? Or is there a better way?
  </p>
  
  <pre><code>var Person struct {
     stringId string //string id which makes the key
     //many other properties.
  }
  
  //insert into datastore
  _, err := datastore.Put(ctx, datastore.NewKey(ctx, entityKind, stringId, 0, nil), entity)
  //retrieve the entity
  datastore.Get(ctx, datastore.NewKey(ctx, entityKind, stringId, 0, nil), entity);
  </code></pre>
  
  <p><br>
  Instead of retrieving complete entity for a given stringId, is there a better way to check the entity exists?</p>