nopanicslicereader

package
v0.0.0-...-1e31c69 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

nopanicslicereader provides little convenience utilities to read "native" endian values from a slice at given offset. Zeroes are returned on out of bounds access instead of panic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int32

func Int32(b []byte, offs uint) int32

Int32 reads one 32-bit signed integer from given byte slice offset

func Ptr

func Ptr(b []byte, offs uint) libpf.Address

Ptr reads one native sized pointer from given byte slice offset

func PtrDiff16

func PtrDiff16(b []byte, offs uint) libpf.Address

PtrDiff16 reads one 16-bit unsigned integer from given byte slice offset and returns it as an address

func PtrDiff32

func PtrDiff32(b []byte, offs uint) libpf.Address

PtrDiff32 reads one 32-bit unsigned integer from given byte slice offset and returns it as an address

func Uint16

func Uint16(b []byte, offs uint) uint16

Uint16 reads one 16-bit unsigned integer from given byte slice offset

func Uint32

func Uint32(b []byte, offs uint) uint32

Uint32 reads one 32-bit unsigned integer from given byte slice offset

func Uint64

func Uint64(b []byte, offs uint) uint64

Uint64 reads one 64-bit unsigned integer from given byte slice offset

func Uint8

func Uint8(b []byte, offs uint) uint8

Uint8 reads one 8-bit unsigned integer from given byte slice offset

Types

This section is empty.

Jump to

Keyboard shortcuts

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