io

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MmapReader

type MmapReader struct {
	*mmap.ReaderAt
	// contains filtered or unexported fields
}

MmapReader is a mmap.ReaderAt wrapper that implements io.Reader.

func NewMmapReader

func NewMmapReader(filename string) (*MmapReader, error)

NewMmapReader returns a new Reader that reads from the file named filename.

func (*MmapReader) Close

func (r *MmapReader) Close() error

Close closes the Reader.

func (*MmapReader) Read

func (r *MmapReader) Read(p []byte) (n int, err error)

Close closes the Reader.

func (*MmapReader) ReadAll

func (r *MmapReader) ReadAll() ([]byte, error)

ReadAll reads all data from the Reader.

func (*MmapReader) ReadLine

func (r *MmapReader) ReadLine() (b []byte, err error)

ReadLine reads a single line from the Reader.

func (*MmapReader) Reset

func (r *MmapReader) Reset()

Reset resets the Reader to the beginning of the file.

Jump to

Keyboard shortcuts

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