interfaces

package
v0.0.0-...-028e29d Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountingWriter

func CountingWriter(w io.Writer) (io.Writer, *int64)

CountingWriter will return pack io writer

func LimitReader

func LimitReader(r io.Reader, n int64) io.Reader

LimitReader will return a limit reader

Types

type ByteCounter

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

An ByteCounter can count word

func (*ByteCounter) Write

func (b *ByteCounter) Write(p []byte) (int, error)

type StringReader

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

StringReader is a reader

func NewReader

func NewReader(in string) *StringReader

NewReader will return a reader

func (*StringReader) Read

func (s *StringReader) Read(p []byte) (int, error)

Read will return data

type WordCounter

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

An WordCounter can count word and line num

func (*WordCounter) Write

func (w *WordCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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