db

package
v0.0.0-...-660a5ed Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrShortWrite = errors.New("short write")
)

Functions

func MultiWriteCloser

func MultiWriteCloser(wc ...io.WriteCloser) io.WriteCloser

MultiWriteCloser creates a WriteCloser that duplicates its writes to all the provided writers, similar to the Unix tee(1) command.

Similarly, it extends the support for io.Closer, by implementing a multiWriteCloser which can commit to the same Close call across all writers

Each write is written to each listed writer, one at a time. If a listed writer returns an error, that overall write operation stops and returns the error; it does not continue down the list. This does not happen with the Close() call, which is intended to be sent to all writers regardless of errors retrieved. It will return a single error encapsulating all errors if existing

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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