I wanted the ability to exclude files by extension as well as multiple directories in one of my projects. So I implemented the Exclude option so that if it detects any regexp special characters it will use a regular expression to match the URI to exclude. Otherwise the feature maintains its original behaviour, and simply checks if the URI contains the Exclude string as a prefix. I also wrote an additional unit test in static_test.go for this option.
I wanted the ability to exclude files by extension as well as multiple directories in one of my projects. So I implemented the Exclude option so that if it detects any regexp special characters it will use a regular expression to match the URI to exclude. Otherwise the feature maintains its original behaviour, and simply checks if the URI contains the Exclude string as a prefix. I also wrote an additional unit test in static_test.go for this option.