aboutsummaryrefslogtreecommitdiff
path: root/internal/extract/extract.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:39:37 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:39:37 +0200
commitc09020c2fb01da24d5befbed78ce3b73b5efbe4c (patch)
tree8cd1086588988fafaf238aed8a38a7ec85b0afa3 /internal/extract/extract.go
parent3990586a85e91923c0a3ae1a1f0f61420db555ac (diff)
downloadkrino-c09020c2fb01da24d5befbed78ce3b73b5efbe4c.tar.gz
krino-c09020c2fb01da24d5befbed78ce3b73b5efbe4c.zip
content tests are three-valued: unknown when unreadable or read in part
Diffstat (limited to 'internal/extract/extract.go')
-rw-r--r--internal/extract/extract.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/extract/extract.go b/internal/extract/extract.go
index 7e3adec..0843c42 100644
--- a/internal/extract/extract.go
+++ b/internal/extract/extract.go
@@ -23,6 +23,11 @@ var (
// ErrUnsupported is returned when the format carries no text krino
// knows how to extract.
ErrUnsupported = errors.New("no text in this format")
+ // ErrPartial wraps the error of a document read only in part (an
+ // archive entry that would not open or parse). Text returns the text it
+ // did read along with it: a keyword found there is found, but one not
+ // found may be in the part that could not be read (plan 11).
+ ErrPartial = errors.New("part of it could not be read")
// ErrTooLarge is returned when the file is larger than the configured
// max-read; nothing is read in that case.
ErrTooLarge = errors.New("larger than max-read")