mimetype
mimetype copied to clipboard
Add support for yaml and markdown file format
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.