An open API service indexing awesome lists of open source software.

https://github.com/alecthomas/unsafeslice

Unsafe zero-copy slice casts for Go
https://github.com/alecthomas/unsafeslice

Last synced: over 1 year ago
JSON representation

Unsafe zero-copy slice casts for Go

Awesome Lists containing this project

README

          

# Unsafe zero-copy slice casts for Go

Convenience functions for casting raw bytes to typed arrays without copying.

Usage:

```go
b := []byte{1, 2, 3, 4}
v := unsafeslice.Uint32SliceFromByteSlice(b)
```