formatplugin

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 9 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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