bytes

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccessOutOfBounds = FileError("cannot access the hex file out of the length of the encoded program")
)

Variables

This section is empty.

Functions

func CustomError

func CustomError(original FileError, msg string, args ...any) error

CustomError returns FileError that can use the classic fmt message/varargs.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func ReadAll

func ReadAll(reader io.Reader) (*File, error)

ReadAll constructs a new File from a reader stream

func (*File) ReadAt

func (bf *File) ReadAt(position int, size int) ([]byte, error)

ReadAt implements random access in read mode for a bytes file

func (*File) WriteAt

func (bf *File) WriteAt(position int, data []byte) error

WriteAt implements random access in write mode for a bytes file

type FileError

type FileError string

FileError identifies an error related to a hex file

func (FileError) Error

func (r FileError) Error() string

Error returns a string representation of a FileError

Jump to

Keyboard shortcuts

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