hex

package
v0.0.0-...-4b1e2ef Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStrEmpty = errors.New("string empty")
	ErrOverflow = errors.New("hex value overflows unsigned 64-bit integer")
	ErrSyntax   = errors.New("string contains invalid characters")
)

Error types

Functions

func ReadUint64

func ReadUint64(s []byte) (uint64, error)

ReadUint64 decodes a lower-case hex value to an unsigned 64-bit integer

func WriteUint64

func WriteUint64(ctx *fasthttp.RequestCtx, num uint64) (int, error)

WriteUint64 writes the given integer as short-lower-hex directly to the given request context to avoid indirect calls which not only incur overhead but also cause unnecessary allocations due to escape analysis

Types

This section is empty.

Jump to

Keyboard shortcuts

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