reflect

package
v0.0.11-3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package unsafeConvert provides functions for unsafely convert between a string and a slice of bytes. You probably shouldn’t use it unless you need to squeeze extra performance from your performance-critical code path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes added in v0.0.10

func Bytes(str string) []byte

Bytes converts a string into a slice of bytes without performing a copy. NOTE: This is an unsafe operation and may lead to problems if the bytes are changed.

func String added in v0.0.10

func String(bytes []byte) string

String converts a slice of bytes into a string without performing a copy. NOTE: This is an unsafe operation and may lead to problems if the bytes passed as argument are changed while the string is used. No checking whether bytes are valid UTF-8 data is performed.

func VisibleFields

func VisibleFields(t reflect.Type) []reflect.StructField

Types

This section is empty.

Jump to

Keyboard shortcuts

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