1package entity
2
3import (
4 bootstrap "github.com/MichaelMure/git-bug/entity/boostrap"
5)
6
7// ErrNotFound is to be returned when an entity, item, element is
8// not found.
9type ErrNotFound = bootstrap.ErrNotFound
10
11var NewErrNotFound = bootstrap.NewErrNotFound
12
13func IsErrNotFound(err error) bool {
14 _, ok := err.(*ErrNotFound)
15 return ok
16}
17
18// ErrMultipleMatch is to be returned when more than one entity, item, element
19// is found, where only one was expected.
20type ErrMultipleMatch = bootstrap.ErrMultipleMatch
21
22var NewErrMultipleMatch = bootstrap.NewErrMultipleMatch
23
24func IsErrMultipleMatch(err error) bool {
25 _, ok := err.(*ErrMultipleMatch)
26 return ok
27}
28
29// ErrInvalidFormat is to be returned when reading on-disk data with an unexpected
30// format or version.
31type ErrInvalidFormat = bootstrap.ErrInvalidFormat
32
33var NewErrInvalidFormat = bootstrap.NewErrInvalidFormat
34
35var NewErrUnknownFormat = bootstrap.NewErrUnknownFormat