Registry / utility / h2non-filetype

h2non-filetype

JSON →
library1.1.3gogounverified

Package filetype provides file type detection based on magic numbers.

go get github.com/h2non/filetype
INSTALL
IMPORT
SIG · H2NON-FILETYPE
H
h2non-filetype
utilitygov1.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

filetype
github.com/h2non/filetype

Detects file type from a byte slice using magic numbers.

package main import ( "fmt" "github.com/h2non/filetype" ) func main() { buf := []byte{0xFF, 0xD8, 0xFF, 0xE0} // JPEG header kind, _ := filetype.Match(buf) fmt.Println(kind.MIME.Value) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
h2non-filetype — go get h2non-filetype · libregistry