mjibson/goon — pull request #16 by mzimmerman (2014-01-13 15:33:06+00:00)
Title: Detect some incomplete key error conditions before the RPC request is issued

...e error "datastore: internal error: server returned the wrong number of entities" Having goon check for these

error conditions saves an RPC request.

getStructKey needs to return an incomplete key for Put requests, so instead added a parameter to extractKeys in order to determine if incomplete keys were okay or not.

Fixed #8, getStructKey(src) throws an error if it's a String ID object and the Id is not populated. Since an incomplete key Put to the datastore results in an int64 Id, having a
String Id be blank is never helpful.

added more unit tests which is where these errors were caught

Conflicts:
goon.go
goon_test.go