io

package
v0.0.0-...-7782d42 Latest Latest
Warning

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

Go to latest
Published: May 7, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package io...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NopReadCloser

func NopReadCloser(x io.Reader) io.ReadCloser

NopReadCloser attaches a nop close method to x.

func NopWriteCloser

func NopWriteCloser(x io.Writer) io.WriteCloser

NopWriteCloser attaches a nop close method to x.

func RunOnCloseReader

func RunOnCloseReader(x io.Reader, run CloseFunc) io.ReadCloser

RunOnCloseReader returns an io.ReadCloser which executes run once, on the first call to Close.

func RunOnCloseWriter

func RunOnCloseWriter(x io.Writer, run CloseFunc) io.WriteCloser

RunOnCloseWrite returns an io.WriteCloser which executes run once, on the first call to Close.

func SovereignReader

func SovereignReader(x io.Reader) io.ReadCloser

SovereignReader returns a synchronized version of the argument reader.

func SovereignWriter

func SovereignWriter(x io.Writer) io.WriteCloser

SovereignWriter returns a synchronized version of the argument writer.

Types

type ChunkReader

type ChunkReader struct {
	*bufio.Scanner
}

func NewChunkReader

func NewChunkReader(r io.Reader) *ChunkReader

func (*ChunkReader) Read

func (r *ChunkReader) Read() (chunk []byte, err error)

type CloseFunc

type CloseFunc func()

Jump to

Keyboard shortcuts

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