stream

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package stream provides utilities for working with IO streams.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	Target io.Writer
	// contains filtered or unexported fields
}

Counter is an io.Writer that forwards writes to another writer, while maintaining a count of the number of bytes written.

func (*Counter) Count

func (c *Counter) Count() int

Count returns the number of bytes written so far.

func (*Counter) Count64

func (c *Counter) Count64() int64

Count64 returns the number of bytes written so far as an int64.

func (*Counter) Write

func (c *Counter) Write(data []byte) (int, error)

type Indenter

type Indenter struct {
	Target io.Writer
	Depth  int
	// contains filtered or unexported fields
}

Indenter is an io.Writer that prefixes each line of text with a fixed indent.

func (*Indenter) Write

func (w *Indenter) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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