fmtcmd

package
v1.0.1-vault-3....-f3301bc Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWriteStdin = errors.New("cannot use write option with standard input")
)

Functions

func Run

func Run(
	paths, extensions []string,
	stdin io.Reader,
	stdout io.Writer,
	opts Options,
) error

Types

type Options

type Options struct {
	List        bool // list files whose formatting differs
	Write       bool // write result to (source) file instead of stdout
	Diff        bool // display diffs of formatting changes
	SpacesWidth int  // number of spaces per indent level
}

Jump to

Keyboard shortcuts

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