https://github.com/wenerme/go-magic
libmagic in golang
https://github.com/wenerme/go-magic
cgo cgo-bindings go golang libmagic
Last synced: 2 months ago
JSON representation
libmagic in golang
- Host: GitHub
- URL: https://github.com/wenerme/go-magic
- Owner: wenerme
- License: mit
- Created: 2021-07-15T16:02:08.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-24T07:45:08.000Z (about 4 years ago)
- Last Synced: 2025-04-01T12:05:29.558Z (6 months ago)
- Topics: cgo, cgo-bindings, go, golang, libmagic
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-magic
[![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![Go Report Card][report-card-img]][report-card]
[doc-img]: https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square
[doc]: https://pkg.go.dev/github.com/wenerme/go-magic?tab=doc
[ci-img]: https://github.com/wenerme/go-magic/actions/workflows/ci.yml/badge.svg
[ci]: https://github.com/wenerme/go-magic/actions/workflows/ci.yml
[cov-img]: https://codecov.io/gh/wenerme/go-magic/branch/main/graph/badge.svg
[cov]: https://codecov.io/gh/wenerme/go-magic/branch/main
[report-card-img]: https://goreportcard.com/badge/github.com/wenerme/go-magic
[report-card]: https://goreportcard.com/report/github.com/wenerme/go-magiclibmagic Golang binding.
## Alternative
- go [net/http#DetectContentType](https://pkg.go.dev/net/http#DetectContentType)
- whatwg [mimesniff](https://mimesniff.spec.whatwg.org/)
- pure go [h2non/filetype](https://github.com/h2non/filetype)
- [adrian-thurston/ragel](https://github.com/adrian-thurston/ragel)## Reference
- [magic_open.3](https://man7.org/linux/man-pages/man3/magic_open.3.html)