gomw

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 3 Imported by: 0

README

GoDoc

gomw

MultiWriter that can use goroutines for parallelized writes.

Using gomw.New returns an io.Writer that implements io.ReaderFrom and will instanciate one goroutine per target when doing operations like io.Copy().

The Write() method itself will not however instanciate goroutines as this would be costly to perform multiple times. This may change in the future.

Usage

mw := gomw.New(targets...)
_, err := io.Copy(mw, source)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T io.Writer](w ...T) io.Writer

Types

This section is empty.

Jump to

Keyboard shortcuts

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