mssola / user_agent

This project has been moved, check the README.md file!

Home Page:https://github.com/mssola/useragent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support []byte

jadbox opened this issue · comments

It would be great to support byte arrays to pass in the user_agent and get user agent sections as bytes. This would help using fasthttp with this library for performance.

You can convert the []byte to string, or use unsafe.

The former cost performance and the later is a bit dirty. If it must be done in an unsafe way, I'd recommended doing the unsafe cast inside the lib instead of requiring clients to do the cast.