diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2017-07-12 17:18:52 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2017-07-20 08:09:23 +0200 |
commit | 3d645268b0030fba5cc2c66bdcc715274cd5bb1c (patch) | |
tree | 4b834e8835c07a5bcd69efaa0f565defd9cb086b /objects | |
parent | 78754a7b23e5fc7a40bd3c450d54a193aaf585b1 (diff) | |
download | petrific-3d645268b0030fba5cc2c66bdcc715274cd5bb1c.tar.gz petrific-3d645268b0030fba5cc2c66bdcc715274cd5bb1c.tar.bz2 petrific-3d645268b0030fba5cc2c66bdcc715274cd5bb1c.zip |
Implement restoring
Diffstat (limited to 'objects')
-rw-r--r-- | objects/id.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/objects/id.go b/objects/id.go index e651801..224b3cd 100644 --- a/objects/id.go +++ b/objects/id.go @@ -68,6 +68,14 @@ func ParseObjectId(s string) (oid ObjectId, err error) { return } +func MustParseObjectId(s string) ObjectId { + id, err := ParseObjectId(s) + if err != nil { + panic(err) + } + return id +} + func (a ObjectId) Equals(b ObjectId) bool { return a.Algo == b.Algo && bytes.Equal(a.Sum, b.Sum) } |