Reputation: 2632
The Datastore API reference for Go has a GetAll function that returns a slice of entities. Isn't there a method that just returns the first entity found instead of a list?
Upvotes: 3
Views: 657
Reputation: 80330
GetAll
executes a query that returns all entities that match query conditions. If you want to return just one, set Limit(limit int)
to 1.
Upvotes: 6