Skip to content

Commit

Permalink
client set key after get
Browse files Browse the repository at this point in the history
  • Loading branch information
acoshift committed Mar 13, 2017
1 parent f3cf382 commit 29fd95a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions get.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
// GetByKey retrieves model from datastore by key
func (client *Client) GetByKey(ctx context.Context, key *datastore.Key, dst interface{}) error {
err := client.Get(ctx, key, dst)
SetKey(key, dst)
if err != nil {
return err
}
Expand All @@ -29,6 +30,7 @@ func (client *Client) GetByKeys(ctx context.Context, keys []*datastore.Key, dst
}

err := client.GetMulti(ctx, keys, dst)
SetKeys(keys, dst)
if err != nil {
return err
}
Expand Down

0 comments on commit 29fd95a

Please sign in to comment.