Help us shape the future of Go! Take the 2026 Go Developer Survey

iowriter

package
v1.34.9 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackWriter

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

CallbackWriter is an io.Writer which calls a callback.

func NewCallbackWriter

func NewCallbackWriter(cb func(p []byte) (n int, err error)) *CallbackWriter

NewCallbackWriter creates a new CallbackWriter with the given callback function.

func (*CallbackWriter) Write

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

Write calls the callback function with the given byte slice. It returns an error if the callback is not defined.

Jump to

Keyboard shortcuts

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