Registry / utility / deitch-magic

deitch-magic

JSON →
library0.0.0-20230404182410-1ff89d7342dagogounverified

Package magic provides file type detection using libmagic bindings.

go get github.com/deitch/magic
INSTALL
IMPORT
SIG · DEITCH-MAGIC
D
deitch-magic
utilitygov0.0.0-20230404182410-1ff89d7342da
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.

magic
github.com/deitch/magic

Detects MIME type of a file using libmagic.

package main import ( "fmt" "github.com/deitch/magic" ) func main() { m, err := magic.Open(magic.MAGIC_NONE) if err != nil { panic(err) } defer m.Close() mimetype, err := m.File("/path/to/file") if err != nil { panic(err) } fmt.Println(mimetype) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20230404182410-1ff89d7342dalatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
deitch-magic — go get deitch-magic · libregistry