limitwriter

package
v0.0.0-...-2ad2f98 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: BSD-3-Clause Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LimitWriter

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

LimitWriter implements io.Writer and writes the data to an io.Writer, but limits the total bytes written to it, dropping the remaining bytes on the floor.

func New

func New(dst io.Writer, limit int) *LimitWriter

New create a new LimitWriter that accepts at most 'limit' bytes.

func (*LimitWriter) Write

func (l *LimitWriter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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