ioutils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountWriter

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

func (*CountWriter) Size

func (c *CountWriter) Size() (n int64)

func (*CountWriter) Write

func (c *CountWriter) Write(p []byte) (n int, err error)

type PositionTrackerReader added in v0.5.0

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

PositionTrackerReader is an `io.Reader` that tracks the current read position in an underlying `io.Reader`

func NewPositionTrackerReader added in v0.5.0

func NewPositionTrackerReader(r io.Reader) *PositionTrackerReader

NewPositionTrackerReader creates a new PositionTrackerReader with the initial position set to 0.

func (*PositionTrackerReader) CurrentPos added in v0.5.0

func (p *PositionTrackerReader) CurrentPos() int64

CurrentPos is the current position of the PositionTrackerReader

func (*PositionTrackerReader) Read added in v0.5.0

func (p *PositionTrackerReader) Read(b []byte) (int, error)

Read reads from the PositionTrackerReader into the provided byte slice. The number position of the PositionTrackerReader is updated based on the number of bytes read

Jump to

Keyboard shortcuts

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