diff options
Diffstat (limited to 'core/object.go')
-rw-r--r-- | core/object.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/object.go b/core/object.go index 7cc8af9..9958570 100644 --- a/core/object.go +++ b/core/object.go @@ -8,6 +8,8 @@ import ( var ( ObjectNotFoundErr = errors.New("object not found") + // ErrInvalidType is returned when an invalid object type is provided. + ErrInvalidType = errors.New("invalid object type") ) // TODO: Consider adding a Hash function to the ObjectReader and ObjectWriter @@ -101,7 +103,7 @@ func ParseObjectType(value string) (typ ObjectType, err error) { case "ref-delta": typ = REFDeltaObject default: - err = errors.New("unable to parse object type") + err = ErrInvalidType } return } |