MCPcopy Index your code
hub / github.com/alecthomas/unsafeslice

github.com/alecthomas/unsafeslice @v0.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.0 ↗ · + Follow
43 symbols 114 edges 2 files 2 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Unsafe zero-copy slice casts for Go

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

Usage:

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

Core symbols most depended-on inside this repo

newSliceHeader
called by 10
unsafeslice.go
newSliceHeaderFromBytes
called by 9
unsafeslice.go
Uint64SliceFromByteSlice
called by 3
unsafeslice.go
ByteSliceFromUint64Slice
called by 3
unsafeslice.go
newRawSliceHeader
called by 2
unsafeslice.go
StringFromByteSlice
called by 2
unsafeslice.go
ByteSliceFromStructSlice
called by 2
unsafeslice.go
Int64SliceFromByteSlice
called by 1
unsafeslice.go

Shape

Function 42
Struct 1

Languages

Go100%

Modules by API surface

unsafeslice.go27 symbols
unsafeslice_test.go16 symbols

For agents

$ claude mcp add unsafeslice \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page