ioutil

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capturer

type Capturer interface {
	Bytes() []byte
}

type HeadWriter

type HeadWriter struct {
	Buf   []byte
	Limit int
	// contains filtered or unexported fields
}

HeadWriter keeps the first 'Limit' bytes in memory.

func (*HeadWriter) Bytes

func (w *HeadWriter) Bytes() []byte

func (*HeadWriter) Write

func (w *HeadWriter) Write(p []byte) (n int, err error)

type OutputCapturer

type OutputCapturer struct {
	HeadWriter
	TailWriter
	Limit int
	// contains filtered or unexported fields
}

func NewOutputCapturer

func NewOutputCapturer(limit int) *OutputCapturer

func (*OutputCapturer) Bytes

func (w *OutputCapturer) Bytes() []byte

func (*OutputCapturer) Write

func (w *OutputCapturer) Write(p []byte) (n int, err error)

type TailWriter

type TailWriter struct {
	Buf   []byte
	Limit int
	// contains filtered or unexported fields
}

tailWriter keeps the last 'Limit' bytes in memory.

func (*TailWriter) Bytes

func (w *TailWriter) Bytes() []byte

func (*TailWriter) Write

func (w *TailWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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