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

cmdfmt

package
v0.82.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExternalFormatterToProvider

func ExternalFormatterToProvider(ext ExternalFormatter) format.Provider

func NewDartFormatter

func NewDartFormatter(cmds ...string) format.Provider

func NewExecFormatter

func NewExecFormatter(opts *BasicExternalFormatterOpts, cmds ...string) format.Provider

func NewNoopBasicExternalFormatProvider

func NewNoopBasicExternalFormatProvider() format.Provider

func NewNoopExternalFormatProvider

func NewNoopExternalFormatProvider() format.Provider

func NewTerraformFormatter

func NewTerraformFormatter(cmds ...string) format.Provider

Types

type BasicExternalFormatterOpts

type BasicExternalFormatterOpts struct {
	Indent  string
	Targets []string
}

type ExternalFormatter

type ExternalFormatter interface {
	Format(ctx context.Context, reader io.Reader) (io.Reader, func() error)
	Indent() string
	Targets() []string
}

type ExternalFormatterConfig

type ExternalFormatterConfig struct {
	Indentation string
	Targets     []string
}

type NoopExternalFormatter

type NoopExternalFormatter struct {
}

func (*NoopExternalFormatter) Format

func (me *NoopExternalFormatter) Format(_ context.Context, input io.Reader) (io.Reader, func() error)

func (*NoopExternalFormatter) Indent

func (me *NoopExternalFormatter) Indent() string

func (*NoopExternalFormatter) Targets

func (me *NoopExternalFormatter) Targets() []string

Jump to

Keyboard shortcuts

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