lineprefixer

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package lineprefixer is a helpers to add prefixes to new lines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

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

Writer is a prefixed line writer.

func NewWriter

func NewWriter(w io.Writer, prefix func() string) *Writer

NewWriter returns a new Writer that adds prefixes to each line written. It then writes prefixed data stream into w.

func (*Writer) Write

func (p *Writer) Write(b []byte) (n int, err error)

Write implements io.Writer.

Jump to

Keyboard shortcuts

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