Checkpoint

This commit is contained in:
2025-10-06 22:25:23 +02:00
parent a23259cfdc
commit a254b306f2
48 changed files with 3327 additions and 212 deletions

25
dataset/error.go Normal file
View File

@@ -0,0 +1,25 @@
package dataset
import (
"errors"
"fmt"
"os"
"github.com/mjl-/bstore"
)
type ErrNotExist struct {
Object string
ID int64
}
func (err ErrNotExist) Error() string {
return fmt.Sprintf("storage: %s not found", err.Object)
}
func IsNotExist(err error) bool {
if err == nil {
return false
}
return os.IsNotExist(err) || errors.Is(err, ErrNotExist{}) || errors.Is(err, bstore.ErrAbsent)
}