unsafex

package
v0.0.0-...-401e8d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package unsafex, like unsafe, contains operations that step around the type safety of Go programs.

Packages that import unsafex may be non-portable and are not protected by the Go 1 compatibility guidelines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteSlice

func ByteSlice(s string) []byte

ByteSlice is a wrapper over unsafe.Slice, converting s to a []byte.

Since Go strings are immutable, the bytes received from ByteSlice must not be modified.

func String

func String(b []byte) string

String is a wrapper over unsafe.String, converting b to a string.

Since Go strings are immutable, the bytes passed to String must not be modified afterwards.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL