Deleting An Entity In Golang

Here’s a short code example demonstrating how to delete an entity in Go. C is an appengine.Contextreference, kind is the entity kind, and entity_id_int represents the integer ID of the entity.

key := datastore.NewKey(c, kind, "", entity_id_int, nil)
datastore.Delete(c, key)