diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 23:07:57 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 23:07:57 +0200 |
| commit | c66a842ce4679a3ffa5504dad39b1402bea75e9f (patch) | |
| tree | 9e9db5e569b9f16a4ca4e66d0a5b0f456a186ece /internal/extract/extract.go | |
| parent | b013e5fb87580e4cab0d85a0d2c8bb402c610413 (diff) | |
| download | krino-c66a842ce4679a3ffa5504dad39b1402bea75e9f.tar.gz krino-c66a842ce4679a3ffa5504dad39b1402bea75e9f.zip | |
plan 10 re-check: cut run column, damaged undo run, emptied directory cleanup, text turning binary, explain flags, interrupt docsv0.0.7
Diffstat (limited to 'internal/extract/extract.go')
| -rw-r--r-- | internal/extract/extract.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/extract/extract.go b/internal/extract/extract.go index ad51c00..376e09b 100644 --- a/internal/extract/extract.go +++ b/internal/extract/extract.go @@ -17,12 +17,17 @@ import ( // Version is the version of the text this package extracts. Bump it // whenever a change could make any format's text differ, so every keyword // cache built from the old text is discarded (Fingerprint). -const Version = 1 +const Version = 2 var ( // ErrUnsupported is returned when the format carries no text krino // knows how to extract. ErrUnsupported = errors.New("no text in this format") + // ErrMixed is returned for a file of no known extension whose first + // 8 KiB read as text but which holds a NUL or invalid UTF-8 further on. + // Unlike ErrUnsupported it is a read failure: the text it began with + // could hold a keyword (plan 10 re-check R4). + ErrMixed = errors.New("text at the start, binary data further on") // 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") |
