Skip to content

Refactor/flags and pkgs#331

Merged
otiai10 merged 6 commits intomainfrom
refactor/flags-and-pkgs
Jan 16, 2026
Merged

Refactor/flags and pkgs#331
otiai10 merged 6 commits intomainfrom
refactor/flags-and-pkgs

Conversation

@otiai10
Copy link
Owner

@otiai10 otiai10 commented Jan 16, 2026

No description provided.

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.
@otiai10 otiai10 merged commit a3b1d1f into main Jan 16, 2026
14 checks passed
@otiai10 otiai10 deleted the refactor/flags-and-pkgs branch January 16, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant