diff options
| author | 2026-06-08 07:00:01 +0000 | |
|---|---|---|
| committer | 2026-06-08 07:00:01 +0000 | |
| commit | b8179d74182932d0e6db149b5d012dfd79866cc3 (patch) | |
| tree | 20a04e7029a2658037d5440f45e043ed843d9db5 /errs/missing.go | |
| parent | REFACTOR: Done with object/stored (diff) | |
errs: Add
Diffstat (limited to 'errs/missing.go')
| -rw-r--r-- | errs/missing.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/errs/missing.go b/errs/missing.go new file mode 100644 index 00000000..0630846c --- /dev/null +++ b/errs/missing.go @@ -0,0 +1,25 @@ +package errs + +import ( + "fmt" + + "lindenii.org/go/furgit/object/id" +) + +// ObjectMissingError indicates that +// a referenced object is absent from the repository object store. +// +// This should only be used +// in situations where objects are being queried recursively +// or otherwise by some chain that the caller may not be aware of. +// +// Failures on direct object access +// should instead use [lindenii.org/go/furgit/object/store.ErrObjectNotFound]. +type ObjectMissingError struct { + OID id.ObjectID +} + +// Error implements error. +func (e *ObjectMissingError) Error() string { + return fmt.Sprintf("missing object %s", e.OID) +} |
