Skip to content

Simplify binary file detection by replacing gofile with filetype library#15

Merged
jcouture merged 1 commit into
mainfrom
refine-binary-scan-handling
Apr 10, 2026
Merged

Simplify binary file detection by replacing gofile with filetype library#15
jcouture merged 1 commit into
mainfrom
refine-binary-scan-handling

Conversation

@jcouture

Copy link
Copy Markdown
Owner
  • Replace github.com/shirou/gofile MIME-based binary detection with github.com/h2non/filetype magic byte matching
  • Remove the custom isBinaryMIME helper function and its associated test coverage
  • Simplify the binary check to a single filetype.Matches(buf) call

  - replace gofile mime detection with filetype matches check
  - remove custom isBinaryMIME helper and associated tests
  - update module dependencies to use github.com/h2non/filetype
@jcouture jcouture merged commit 6854ad2 into main Apr 10, 2026
1 check passed
@jcouture jcouture deleted the refine-binary-scan-handling branch April 10, 2026 17:16
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