mjibson/goon — pull request #23 by xStrom (2014-01-21 22:52:08+00:00)
Title: Improvements to keys-only queries.

With these changes the ```GetAll``` method has the ability to fill ```dst``` with empty structs, only setting their goon key fields. This is only for keys-only queries, regular query functionality is untouched. Additionally, this functionality works only when ```dst``` is non-nil. Cache is not polluted with these empty structs.

// The following line worked before, and continues to work the same way
g.GetAll(datastore.NewQuery("Fruit").KeysOnly(), nil)

// However when supplying a proper slice,
// it is filled with empty structs with the key fields set
fruits := []*Fruit{}
g.GetAll(datastore.NewQuery("Fruit").KeysOnly(), &fruits)

// Which allows us to conveniently fetch them all,
// with the benefit of caches that a standard query doesn't have
n.GetMulti(fruits)