byteconv

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package byteconv implements conversions from byte slice representations of various data types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseBool

func ParseBool(b []byte) (bool, error)

func ParseFloat64

func ParseFloat64(b []byte) (float64, error)

func ParseIP

func ParseIP(b []byte) (netip.Addr, error)

func ParseInt16

func ParseInt16(b []byte) (int16, error)

func ParseInt32

func ParseInt32(b []byte) (int32, error)

func ParseInt64

func ParseInt64(b []byte) (int64, error)

func ParseInt8

func ParseInt8(b []byte) (int8, error)

func ParseUint16

func ParseUint16(b []byte) (uint16, error)

func ParseUint32

func ParseUint32(b []byte) (uint32, error)

func ParseUint64

func ParseUint64(b []byte) (uint64, error)

func ParseUint8

func ParseUint8(b []byte) (uint8, error)

func UnsafeString

func UnsafeString(b []byte) string

UnsafeString converts a byte slice to a string without copying the underlying data. Unsafe string coversion is OK when calling some other function that doesn't store the string and otherwise never uses the string again.

Types

This section is empty.

Jump to

Keyboard shortcuts

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