fmtwriter

package
v0.0.0-...-6d3478e Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WriterTo

type WriterTo struct {
	io.WriterTo

	Metrics metrics.Metrics
	// contains filtered or unexported fields
}

WriterTo defines a takes the contents of a provided io.WriterTo against go fmt and returns the result.

func New

func New(wt io.WriterTo, useGoReturns bool, attemptFallbackToFmtInError bool) *WriterTo

New returns a new instance of FmtWriterTo.

func NewWith

func NewWith(m metrics.Metrics, wt io.WriterTo, useGoReturns bool, attemptFallbackToFmtInError bool) *WriterTo

NewWith returns a new instance of FmtWriterTo.

func (WriterTo) WriteTo

func (fm WriterTo) WriteTo(w io.Writer) (int64, error)

WriteTo writes the content of the source after running against gofmt to the provider writer.

Jump to

Keyboard shortcuts

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