From 3d645268b0030fba5cc2c66bdcc715274cd5bb1c Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Wed, 12 Jul 2017 17:18:52 +0200 Subject: Implement restoring --- objects/id.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'objects') 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) } -- cgit v1.2.3-70-g09d2