| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // +build appengine |
| 6 |
| 5 package meta | 7 package meta |
| 6 | 8 |
| 7 import ( | 9 import ( |
| 8 "appengine/datastore" | 10 "appengine/datastore" |
| 9 | 11 |
| 10 "infra/gae/libs/context" | 12 "infra/gae/libs/context" |
| 11 "infra/libs/errors" | 13 "infra/libs/errors" |
| 12 ) | 14 ) |
| 13 | 15 |
| 14 var mark = errors.MakeMarkFn("eg") | 16 var mark = errors.MakeMarkFn("eg") |
| (...skipping 21 matching lines...) Expand all Loading... |
| 36 err := c.Get(egm) | 38 err := c.Get(egm) |
| 37 if err != datastore.ErrNoSuchEntity { | 39 if err != datastore.ErrNoSuchEntity { |
| 38 err = mark(err) | 40 err = mark(err) |
| 39 } else { | 41 } else { |
| 40 // this is OK for callers. The version of the entity group is ef
fectively 0 | 42 // this is OK for callers. The version of the entity group is ef
fectively 0 |
| 41 // in this case. | 43 // in this case. |
| 42 err = nil | 44 err = nil |
| 43 } | 45 } |
| 44 return egm.Version, err | 46 return egm.Version, err |
| 45 } | 47 } |
| OLD | NEW |