Registry / utility / h2non-filetype-v1

h2non-filetype-v1

JSON →
library1.0.5gogounverified

Package filetype provides file type detection based on magic numbers.

go get gopkg.in/h2non/filetype.v1
INSTALL
IMPORT
SIG · H2NON-FILETYPE-V1
H
h2non-filetype-v1
utilitygov1.0.5
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
gopkg.in/h2non/filetype.v1

Detects the file type from a byte slice using magic numbers.

package main import ( "fmt" "gopkg.in/h2non/filetype.v1" ) 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.0.5latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

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