package
Version:
v1.2.0
Opens a new window with list of versions in this module.
Published: Mar 17, 2026
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
IsBinary: 콘텐츠가 바이너리인지 확인.
우선 Go 표준 라이브러리의 포맷 파서로 실행파일 형식을 감지하고,
이후 mimetype으로 이미지/아카이브 등 기타 바이너리를 판별.
- debug/elf: Linux/BSD ELF 실행파일
- debug/macho: macOS Mach-O 실행파일
- debug/pe: Windows PE 실행파일
- mimetype: 그 외 바이너리 (이미지, ZIP, PDF 등)
Result: 파일 인코딩 검사 결과.
CheckUTF8: 콘텐츠가 유효한 UTF-8인지 검증.
유효성은 바이트 시퀀스로 직접 판단하고, chardet은 에러 메시지용 charset 이름 제공에만 사용.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.