erikdubbelboer / fasthttp

This fork has been deprecated!
MIT License
50 stars 12 forks source link

Enhanced some features of the library #6

Closed dgrr closed 6 years ago

illotum commented 6 years ago

Is it because https://golang.org/pkg/mime/ is too slow for your use case? I mean ContentType, not fixes.

erikdubbelboer commented 6 years ago

I tested it and your ContentType function is only 50ns faster than mime.TypeByExtension while mime.TypeByExtension loads from system files and is therefor much more dynamic and supports many more extensions. Both don't allocate any memory so the 50ns is too small a difference to add this code and having to maintain it in the future.

The other commits look good, if you could make separate pull requests for those or remove the ContentType commits from this pull request that would be great.

dgrr commented 6 years ago

@erikdubbelboer okay, I don't see the mime library. I only search to do easy to fasthttp using standard datatypes of http protocol. I am going to delete this commits.

dgrr commented 6 years ago

Done

erikdubbelboer commented 6 years ago

Thanks.