diff options
| author | 2026-05-18 06:57:13 +0000 | |
|---|---|---|
| committer | 2026-05-18 06:57:13 +0000 | |
| commit | 4059ba159c9ef3dbeef0e9f9a82b4073a458a759 (patch) | |
| tree | e97346b06515c4a3c40001cabfa612235af4e823 /object | |
| parent | internal/intconv: Wrap docs (diff) | |
| signature | No signature | |
object/store: ErrObjectNotFound is specifically reader-associated
Diffstat (limited to 'object')
| -rw-r--r-- | object/store/errors.go | 17 | ||||
| -rw-r--r-- | object/store/reader.go | 15 |
2 files changed, 15 insertions, 17 deletions
diff --git a/object/store/errors.go b/object/store/errors.go deleted file mode 100644 index 4aaf9f84..00000000 --- a/object/store/errors.go +++ /dev/null @@ -1,17 +0,0 @@ -package store - -import "errors" - -// ErrObjectNotFound indicates that -// an object does not exist in a backend. -// This error must only be produced by object stores, -// when it has no specified object ID, -// but no other unexpected conditions were encountered. -var ErrObjectNotFound = errors.New("objectstore: object not found") - -// This is a sentinel with no details, -// because it could be a frequent occurrence, -// and allocating frequently on expected error paths -// would be extremely harmful to performance. -// Sometime, I will audit this again. -// TODO diff --git a/object/store/reader.go b/object/store/reader.go index ba7a34f2..f26354e3 100644 --- a/object/store/reader.go +++ b/object/store/reader.go @@ -1,6 +1,7 @@ package store import ( + "errors" "io" "codeberg.org/lindenii/furgit/object/id" @@ -57,3 +58,17 @@ type ObjectReader interface { // Backends without dynamic discovery should do nothing and return nil. Refresh() error } + +// ErrObjectNotFound indicates that +// an object does not exist in a backend. +// This error must only be produced by object stores, +// when it has no specified object ID, +// but no other unexpected conditions were encountered. +var ErrObjectNotFound = errors.New("objectstore: object not found") + +// This is a sentinel with no details, +// because it could be a frequent occurrence, +// and allocating frequently on expected error paths +// would be extremely harmful to performance. +// Sometime, I will audit this again. +// TODO |
