out

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: MIT Imports: 2 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LazyFile

type LazyFile struct {
	// FileName is path to the file to which genny will write.
	FileName string
	// contains filtered or unexported fields
}

LazyFile is an io.WriteCloser which defers creation of the file it is supposed to write in till the first call to its write function in order to prevent creation of file, if no write is supposed to happen.

func (*LazyFile) Close

func (lw *LazyFile) Close() error

Close closes the file if it is created. Returns nil if no file is created.

func (*LazyFile) Write

func (lw *LazyFile) Write(p []byte) (int, error)

Write writes to the specified file and creates the file first time it is called.

Jump to

Keyboard shortcuts

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