Skip to content

A small utility for converting unsafely between string and []byte without allocations in Golang

Notifications You must be signed in to change notification settings

fmstephe/unsafeutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unsafe Conversions Between String <-> []byte

This repo is intended to be a clear implementation of the solution suggested by Keith Randal here

https://groups.google.com/d/msg/golang-nuts/Zsfk-VMd_fU/WXPjfZwPBAAJ

This avoids the problems associated with using a uintptr as well as failing tests if the runtime representation of string or []byte changes.

About

A small utility for converting unsafely between string and []byte without allocations in Golang

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages