outputwriter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutputWriter

type OutputWriter struct {
	Path   string
	Buffer *bytes.Buffer
	Writer io.Writer
}

OutputWriter determines which output that the applications written to with the default output being stdout. When the output path is specified, it will store the data to buffer before being flushed out to other media such as file.

func New

func New(outputPath string) *OutputWriter

New instantiates new *outputwriter.OutputWriter.

func (*OutputWriter) SaveBufferToFile

func (o *OutputWriter) SaveBufferToFile() error

SaveBufferToFile saves data written on the buffer to designated file path.

Jump to

Keyboard shortcuts

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