Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export instances of supported MIME types to make checking easier #458

Open
bouwerp opened this issue Nov 24, 2023 · 1 comment
Open

Export instances of supported MIME types to make checking easier #458

bouwerp opened this issue Nov 24, 2023 · 1 comment

Comments

@bouwerp
Copy link

bouwerp commented Nov 24, 2023

Export instances of usable MIME types, e.g.:

...
mType := mimetype.Detect(data)

if mimtype.XLSX.Is(mType.String()) {
    ...
}
...

This can easily be done by declaring exported variables dereferencing the values defined in tree.go:

var Xz = *xz
var GZIP = *gzip
var SEVENZ = *sevenZ
var ZIP = *zip
var TAR = *tar
...
@bouwerp
Copy link
Author

bouwerp commented Nov 24, 2023

B.t.w., how do I submit a PR to add this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant