aboutsummaryrefslogtreecommitdiffhomepage
path: root/ldd/error.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-11-14 08:14:46 +0900
committerOphestra <cat@gensokyo.uk>2025-11-14 08:33:19 +0900
commit690a0ed0d68e270e60bfe9c7cd575c4e986de83d (patch)
treebe14195bb5b4e64ddfceb19a4a09d0c5f9f3cec3 /ldd/error.go
parenta9d72a5eb19827ded874e359a99f91cc4d91f4b3 (diff)
ldd: decode from reader
This should reduce memory footprint of the parsing process and allow decoding part of the stream. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'ldd/error.go')
-rw-r--r--ldd/error.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/ldd/error.go b/ldd/error.go
deleted file mode 100644
index 39b63ef9..00000000
--- a/ldd/error.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package ldd
-
-import (
- "errors"
- "fmt"
-)
-
-var (
- ErrUnexpectedSeparator = errors.New("unexpected separator")
- ErrPathNotAbsolute = errors.New("path not absolute")
- ErrBadLocationFormat = errors.New("bad location format")
- ErrUnexpectedNewline = errors.New("unexpected newline")
-)
-
-type EntryUnexpectedSegmentsError string
-
-func (e EntryUnexpectedSegmentsError) Is(err error) bool {
- var eq EntryUnexpectedSegmentsError
- if !errors.As(err, &eq) {
- return false
- }
- return e == eq
-}
-
-func (e EntryUnexpectedSegmentsError) Error() string {
- return fmt.Sprintf("unexpected segments in entry %q", string(e))
-}