Conversation
Add bounds checking before accessing slice elements to prevent panic when HOCR output is empty or malformed. This provides clearer error messages instead of a runtime panic.
ioutil package was deprecated in Go 1.16. Use os.ReadFile instead which provides the same functionality.
Add separate installation sections for macOS, Linux (Debian/Ubuntu), and Windows. The Windows section documents the vcpkg + MinGW setup required for CGO compatibility.
The mwaeckerlin/mingw base image has an old Go version that doesn't support os.ReadFile (introduced in Go 1.16). Since the module requires Go 1.21, manually download and install Go 1.21.13 instead of using the apt package.
Update debian.Dockerfile and debian_tess4.1.1.Dockerfile to manually install Go 1.21.13 instead of using the apt package, which provides an older version that doesn't support os.ReadFile.
The golang apt package included gcc as a dependency. Since we now install Go manually, we need to explicitly install gcc and g++ for CGO to work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.