GetLanguageByExtension is (imo) the most likely way to match files, followed by special file names, and finally by content.
GetLanguage is likely the best general strategy, as seen in #26.
This PR can most likely be closed as superseded, unless you'd like to use this PR as a more contained "enry update".
The various parts of the original PR have been implemented elsewhere, only thing left is removing the markdown hack since enry should now handle it correctly.
GetLanguageByFilename
appears to be for specially named files https://github.com/go-enry/go-enry/blob/master/data/filename.goGetLanguageByExtension
is (imo) the most likely way to match files, followed by special file names, and finally by content.GetLanguage
is likely the best general strategy, as seen in #26. This PR can most likely be closed as superseded, unless you'd like to use this PR as a more contained "enry update".This also resolves the hack in place, as
.markdown
is already supported by enry. https://github.com/go-enry/go-enry/blob/93616cf55babb3e8d3b5ee143033c53511c7ce88/data/extension.go#L625