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

Add support for yaml and markdown file format #399

Open
zuzuviewer opened this issue Jun 10, 2023 · 1 comment
Open

Add support for yaml and markdown file format #399

zuzuviewer opened this issue Jun 10, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@zuzuviewer
Copy link

  1. Specify the MIME type and extension for which to add support
    yaml and markdown

  2. Share an example file

  3. Optionally, add a reference to the specification of the file format.
    yaml markdown

@zuzuviewer zuzuviewer added the enhancement New feature or request label Jun 10, 2023
@zuzuviewer zuzuviewer changed the title Add support for X file format Add support for yaml and markdown file format Jun 21, 2023
@timrulebosch
Copy link

You can do this:

yamlDetector := func(raw []byte, limit uint32) bool {
	return true
}
mimetype.Lookup("text/plain").Extend(yamlDetector, "text/yaml", ".yaml")
mimetype.Lookup("text/plain").Extend(yamlDetector, "text/yaml", ".yml")

Or something more robust, such as loading the YAML file.

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

No branches or pull requests

2 participants