formatplugin

package
v1.53.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(param Param, projectDir string, verify bool, providedFiles []string, stdout io.Writer) error

Types

type ConfigUpgrader

type ConfigUpgrader interface {
	TypeName() string
	UpgradeConfig([]byte) ([]byte, error)
}

type Factory

type Factory interface {
	Types() []string
	NewFormatter(typeName string, cfgYMLBytes []byte) (Formatter, error)
	ConfigUpgrader(typeName string) (ConfigUpgrader, error)
}

type Formatter

type Formatter interface {
	// TypeName returns the type of this Formatter.
	TypeName() (string, error)

	// Format runs the format operation on the provided files. If "list" is true, then the files that would be changed
	// are printed to stdout rather than formatting the files.
	Format(files []string, list bool, projectDir string, stdout io.Writer) error
}

type Param

type Param struct {
	Formatters []Formatter
	Exclude    matcher.Matcher
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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