Help us shape the future of Go! Take the 2026 Go Developer Survey

fmtcmd

package
v0.3.1100 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(log *slog.Logger, stdin io.Reader, stdout io.Writer, args Arguments) (err error)

Types

type Arguments added in v0.0.1057

type Arguments struct {
	FailIfChanged    bool
	ToStdout         bool
	StdinFilepath    string
	Files            []string
	WorkerCount      int
	PrettierCommand  string
	PrettierRequired bool
}

type Formatter added in v0.0.1057

type Formatter struct {
	Log          *slog.Logger
	Dir          string
	Process      func(fileName string) (error, bool)
	WorkerCount  int
	FailIfChange bool
	ShouldSkip   func(string) bool
}

func NewFormatter added in v0.0.1057

func NewFormatter(log *slog.Logger, dir string, process func(fileName string) (error, bool), workerCount int, failIfChange bool, shouldSkip func(string) bool) *Formatter

func (*Formatter) Run added in v0.0.1057

func (f *Formatter) Run() (err error)

Jump to

Keyboard shortcuts

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