cmdfmt

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 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(ctx context.Context, cmds ...string) format.Provider

func NewExecFormatter

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

func NewNoopBasicExternalFormatProvider

func NewNoopBasicExternalFormatProvider() format.Provider

func NewNoopExternalFormatProvider

func NewNoopExternalFormatProvider() format.Provider

func NewSwiftFormatter added in v2.3.0

func NewSwiftFormatter(ctx context.Context, cmds ...string) format.Provider

func NewTerraformFormatter

func NewTerraformFormatter(ctx context.Context, cmds ...string) format.Provider

Types

type BasicExternalFormatterOpts

type BasicExternalFormatterOpts struct {
	Indent    string
	TempFiles map[string]string
}

type ExternalFormatter

type ExternalFormatter interface {
	Format(ctx context.Context, reader io.Reader) (io.Reader, func() error)
	Indent() string
	TempFiles() map[string]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) TempFiles added in v2.8.0

func (me *NoopExternalFormatter) TempFiles() map[string]string

Jump to

Keyboard shortcuts

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