stream

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package stream provides a set of utils to modify the stream.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReplaceReader added in v0.3.1

type ReplaceReader interface {
	io.Reader

	// Count() returns the number of replacements.
	Count() int
}

ReplaceReader is a wrapper of io.Reader, and have additional methods.

func NewSimpleReplacer

func NewSimpleReplacer(r io.Reader, old []byte, new []byte) ReplaceReader

NewSimpleReplacer returns a new Reader with streaming replace supports. It will replace every sequences matching `old` with `new`. This replacer will try to use as less mem as possible.

Jump to

Keyboard shortcuts

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