user_agent icon indicating copy to clipboard operation
user_agent copied to clipboard

Support []byte

Open jadbox opened this issue 8 years ago • 2 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.

jadbox avatar May 24 '16 18:05 jadbox

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

pierrre avatar Nov 20 '18 07:11 pierrre

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.

jadbox avatar Nov 20 '18 15:11 jadbox